groupoffice
groupoffice copied to clipboard
Confirm close window with changes
Hi :)
The default notification for closing a dialog window before saving appears even when changes have not been made. This happens in a dialog window where data is automatically populated immediately after its opening.
There are situations in the modules I've created where data isn't fetched 'live' upon opening, and in those cases, such a window can be closed without notification.
Is it possible to disable this for a specific dialog window?
Juliusz
You can do two things:
- set closeWithModification = true on the window
- call yourwin.formPanel.form.trackReset(); after populating so it will behave as it should.
Good luck!
I applied solution number 2.
I used it in either onReady:
or this.on('ready', function(){...})
just before the last closing curly brace.
It works Thank you.