Commit 846097d8 authored by Julia Radzhabova's avatar Julia Radzhabova

[Mobile] Disable toolbar buttons while document is loading.

parent e6379cda
...@@ -544,6 +544,8 @@ define([ ...@@ -544,6 +544,8 @@ define([
me.api.zoomFitToWidth(); me.api.zoomFitToWidth();
} }
DE.getController('Toolbar').activateControls();
if (me._state.licenseWarning) { if (me._state.licenseWarning) {
value = Common.localStorage.getItem("de-license-warning"); value = Common.localStorage.getItem("de-license-warning");
value = (value!==null) ? parseInt(value) : 0; value = (value!==null) ? parseInt(value) : 0;
......
...@@ -157,6 +157,10 @@ define([ ...@@ -157,6 +157,10 @@ define([
} }
}, },
activateControls: function() {
$('#toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back').removeClass('disabled');
},
dlgLeaveTitleText : 'You leave the application', dlgLeaveTitleText : 'You leave the application',
dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
leaveButtonText : 'Leave this Page', leaveButtonText : 'Leave this Page',
......
...@@ -92,6 +92,7 @@ define([ ...@@ -92,6 +92,7 @@ define([
})); }));
$('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me)); $('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me));
$('#toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back').addClass('disabled');
return me; return me;
}, },
......
...@@ -509,6 +509,8 @@ define([ ...@@ -509,6 +509,8 @@ define([
me.api.zoomFitToPage(); me.api.zoomFitToPage();
} }
PE.getController('Toolbar').activateControls();
if (me._state.licenseWarning) { if (me._state.licenseWarning) {
value = Common.localStorage.getItem("de-license-warning"); value = Common.localStorage.getItem("de-license-warning");
value = (value!==null) ? parseInt(value) : 0; value = (value!==null) ? parseInt(value) : 0;
......
...@@ -168,6 +168,10 @@ define([ ...@@ -168,6 +168,10 @@ define([
} }
}, },
activateControls: function() {
$('#toolbar-preview, #toolbar-settings, #toolbar-search, #document-back').removeClass('disabled');
},
dlgLeaveTitleText : 'You leave the application', dlgLeaveTitleText : 'You leave the application',
dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
leaveButtonText : 'Leave this Page', leaveButtonText : 'Leave this Page',
......
...@@ -93,6 +93,7 @@ define([ ...@@ -93,6 +93,7 @@ define([
})); }));
$('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me)); $('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me));
$('#toolbar-preview, #toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back').addClass('disabled');
return me; return me;
}, },
......
...@@ -527,6 +527,7 @@ define([ ...@@ -527,6 +527,7 @@ define([
mode: me.appOptions.isEdit ? 'edit' : 'view' mode: me.appOptions.isEdit ? 'edit' : 'view'
}); });
SSE.getController('Toolbar').activateControls();
if (me._state.licenseWarning) { if (me._state.licenseWarning) {
value = Common.localStorage.getItem("sse-license-warning"); value = Common.localStorage.getItem("sse-license-warning");
......
...@@ -191,6 +191,10 @@ define([ ...@@ -191,6 +191,10 @@ define([
this.getView('Toolbar').disableControl(['add', 'edit'], islocked); this.getView('Toolbar').disableControl(['add', 'edit'], islocked);
}, },
activateControls: function() {
$('#toolbar-settings, #toolbar-search, #document-back').removeClass('disabled');
},
dlgLeaveTitleText : 'You leave the application', dlgLeaveTitleText : 'You leave the application',
dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
leaveButtonText : 'Leave this Page', leaveButtonText : 'Leave this Page',
......
...@@ -82,6 +82,7 @@ define([ ...@@ -82,6 +82,7 @@ define([
})); }));
$('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me)); $('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me));
$('#toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back').addClass('disabled');
this.$btnEdit = $el.find('#toolbar-edit'); this.$btnEdit = $el.find('#toolbar-edit');
this.$btnAdd = $el.find('#toolbar-add'); this.$btnAdd = $el.find('#toolbar-add');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment