Atrium.promptCloseTab

 

By default, Atrium does not prompt when users click on the tab close button  or the Atrium Exit button . When a tab containing a Profound UI session is closed, the session is unloaded, and the tab disappears. When the Exit button is clicked, Profound UI sessions are unloaded from all tabs.

You can configure Atrium to prompt the user when close is clicked:

And you can prompt the user when Exit is clicked:

This feature became available in Profound UI Version 5, Fix Pack 3.1.

Prompt Modes

There are 4 levels of prompting available when the user closes a tab or clicks the Exit button:

  • 0: Never prompt.

  • 1:

    • Closing a tab: only prompt when the tab contains a Profound UI session.

    • Clicking Exit: only prompt when any tabs are open with a Profound UI session.

  • 2:

    • Closing a tab: always prompt.

    • Clicking Exit: prompt only when at least one tab is open, even if not a Profound UI session.

  • 3:

    • Closing a tab: always prompt.

    • Clicking Exit: always prompt, even if no tabs are open.

Setup

First you'll need a Javascript file in the /YourInstanceName/userdata/extension/atrium/ folder for custom settings. For example, if your instance name is "profoundui", create a new file on your IFS: /profoundui/userdata/extension/atrium/yourcode.js

Next, you can decide to prompt the user when closing tabs running sessions of ProfoundUI. For this mode of prompt, add this line to the file:

Atrium.promptCloseTab = 1;

You can choose any of the prompt modes, 0, 1, 2, or 3, depending on the desired amount of prompting.

Custom Prompts

The default prompts are "Do you want to close this tab" for a single tab, and "Close all tabs?" for clicking on the Exit button. The end developer may override them by defining these strings in the Atrium Extension file, e.g. /YourInstanceName/userdata/extension/atrium/yourcode.js:

Atrium.closeTabMessage = "Are you sure you want to close the tab this way?"; Atrium.closeAllTabsMessage = "Are you sure you want to close all tabs?";

The custom prompt strings are available with Profound UI Version 5, Fix Pack 4.0.