[Mobile] Disable toolbar buttons while document is loading.

This commit is contained in:
Julia Radzhabova 2017-07-07 11:41:19 +03:00
parent 86c3493c1c
commit 543b4357b5
9 changed files with 20 additions and 0 deletions

View file

@ -541,6 +541,8 @@ define([
me.api.zoomFitToWidth();
}
DE.getController('Toolbar').activateControls();
if (me._state.licenseWarning) {
value = Common.localStorage.getItem("de-license-warning");
value = (value!==null) ? parseInt(value) : 0;

View file

@ -157,6 +157,10 @@ define([
}
},
activateControls: function() {
$('#toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back').removeClass('disabled');
},
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.',
leaveButtonText : 'Leave this Page',

View file

@ -92,6 +92,7 @@ define([
}));
$('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me));
$('#toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back').addClass('disabled');
return me;
},

View file

@ -508,6 +508,8 @@ define([
me.api.zoomFitToPage();
}
PE.getController('Toolbar').activateControls();
if (me._state.licenseWarning) {
value = Common.localStorage.getItem("de-license-warning");
value = (value!==null) ? parseInt(value) : 0;

View file

@ -168,6 +168,10 @@ define([
}
},
activateControls: function() {
$('#toolbar-preview, #toolbar-settings, #toolbar-search, #document-back').removeClass('disabled');
},
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.',
leaveButtonText : 'Leave this Page',

View file

@ -93,6 +93,7 @@ define([
}));
$('.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;
},

View file

@ -527,6 +527,7 @@ define([
mode: me.appOptions.isEdit ? 'edit' : 'view'
});
SSE.getController('Toolbar').activateControls();
if (me._state.licenseWarning) {
value = Common.localStorage.getItem("sse-license-warning");

View file

@ -191,6 +191,10 @@ define([
this.getView('Toolbar').disableControl(['add', 'edit'], islocked);
},
activateControls: function() {
$('#toolbar-settings, #toolbar-search, #document-back').removeClass('disabled');
},
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.',
leaveButtonText : 'Leave this Page',

View file

@ -82,6 +82,7 @@ define([
}));
$('.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.$btnAdd = $el.find('#toolbar-add');