Stay/Leave popup. Closes #39
This commit is contained in:
parent
fdf7a602d4
commit
d69c02e2bb
@ -126,11 +126,13 @@ var documentsMain = {
|
|||||||
prepareSession : function(){
|
prepareSession : function(){
|
||||||
documentsMain.isEditorMode = true;
|
documentsMain.isEditorMode = true;
|
||||||
documentsMain.UI.showOverlay();
|
documentsMain.UI.showOverlay();
|
||||||
|
$(window).on('beforeunload', function(){return t('documents', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead.")})
|
||||||
},
|
},
|
||||||
|
|
||||||
prepareGrid : function(){
|
prepareGrid : function(){
|
||||||
documentsMain.isEditorMode = false;
|
documentsMain.isEditorMode = false;
|
||||||
documentsMain.UI.hideOverlay();
|
documentsMain.UI.hideOverlay();
|
||||||
|
$(window).off('beforeunload');
|
||||||
},
|
},
|
||||||
|
|
||||||
initSession: function(response) {
|
initSession: function(response) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user