• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[INCORPORATED] Valence Portal Tabs Close

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [INCORPORATED] Valence Portal Tabs Close

    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.

  • #2
    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?

    Comment


    • #3
      That sounds like it would work great for us.
      Now for the next question, how close are you to having 3.2 out and will it use ExtJS 4.1?
      Last edited by ktoole; 11-02-2012, 02:15 PM.

      Comment


      • #4
        3.2 is scheduled for release sometime in October and it will be using ExtJS 4.1.1.

        Comment


        • #5
          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


          • #6
            Yes, you can now call Valence.app.setPromptBeforeClose. It can be used a follows:

            To activate
            Code:
            Valence.app.setPromptBeforeClose(window,true);
            This will output a default title and message to the user when attempting to close the app:

            2012-11-07_2328.png

            Alternately, you can provide your own title/message:

            Code:
            Valence.app.setPromptBeforeClose(window,{
                title : 'My Title',
                msg : 'My message....'
            });
            To de-activate
            Code:
            Valence.app.setPromptBeforeClose(window,false);
            I'll put vvIn_time on our internal list.

            Comment

            Working...
            X