Author |
|
iSofia Newbie
Joined: 24 May 2014 Location: Singapore
Online Status: Offline Posts: 35
|
Posted: 25 October 2014 at 12:02am | IP Logged
|
|
|
How would we determine if any of the panels of our plugin has lost focus?
In the built-in settings, whenever any changes have been made but not saved, and we try to navigate away, we'd receive a warning pop-up asking whether to save or not.
I'm able to handle this when navigating between the panels of my own plugin, but not when navigating to WebMail's built-in panels, like COMMON SETTINGS & EMAIL ACCOUNTS.
Thank you.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 27 October 2014 at 3:26am | IP Logged
|
|
|
To make this kind of confirmation work, the object model needs to have the following functions:
- isChanged - returns true if there were changes, false otherwise;
- onSaveClick - saves changes if confirmed by user;
- init - resets data if saving changes rejected by user;
Hope this helps!
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
iSofia Newbie
Joined: 24 May 2014 Location: Singapore
Online Status: Offline Posts: 35
|
Posted: 27 October 2014 at 10:51am | IP Logged
|
|
|
Igor wrote:
- isChanged - returns true if there were changes, false otherwise;
- onSaveClick - saves changes if confirmed by user;
- init - resets data if saving changes rejected by user;
|
|
|
Hello Igor, and once again, thank you. I was playing around with primitive methods like onBlur, but having a whole lot of issues sieving the panel and elements focus. I had no idea (how would I? or should I?) that these properties were exposed to and controllable by the main app.
Your suggestions pointed me in the right direction, especially to the onHide property.
You've always come through and I highly appreciate your help.
Sincerely,
Sofia
|
Back to Top |
|
|