Would it be possible to add an option to the app database that would allow a message to pop up if a users tries to close a tab they have opened from the navagation options? The message would be something like, "Are you sure you want to close this tab. Any unsaved data will be lost." This could work similar to the clicking of the browser window close where it says, "Are you sure", "This page is asking you to confirm that you want to leave - data you have entered may not be saved" and you can choose to Leave Page or Stay on Page. Adding a field to the app database would allow all the CNX customers to decide if they want this message to appear or not on any particular option. You might want it on an option to update data, but not on one that just displays information for a user.
Announcement
Collapse
No announcement yet.
[INCORPORATED] Valence Portal Tabs Close
Collapse
X
-
Funny you should ask as this is actually already on our internal to-do list. I think we can get this incorporated for 3.2. However, we had it drawn up a bit different. We were envisioning that it would be more of a programmatic setting that could be turned on/off. For example, if a user clicked on a record to edit it, you might make a call to Valence.tab.promptBeforeClose(true). If they cancel out of it, then you would call Valence.tab.promptBeforeClose(false).
Or you could just make the call at the launch of the app and never set it off.
Does this sound like it would work out all right for you?
-
Did you add "For example, if a user clicked on a record to edit it, you might make a call to Valence.tab.promptBeforeClose(true). If they cancel out of it, then you would call Valence.tab.promptBeforeClose(false)" into the 3.2 version?
Also wondering about a vvIn_time. Any plans for that?
Comment
-
Yes, you can now call Valence.app.setPromptBeforeClose. It can be used a follows:
To activate
Code:Valence.app.setPromptBeforeClose(window,true);
2012-11-07_2328.png
Alternately, you can provide your own title/message:
Code:Valence.app.setPromptBeforeClose(window,{ title : 'My Title', msg : 'My message....' });
Code:Valence.app.setPromptBeforeClose(window,false);
Comment
Comment