Merge branch 'feature/new-toolbar'

This commit is contained in:
Maxim Kadushkin 2017-07-17 14:57:42 +03:00
commit 9005b3da01
21 changed files with 39 additions and 18 deletions

View file

@ -454,6 +454,7 @@ define([
Common.UI.Menu.Manager.hideAll();
if ( $(e.currentTarget).closest('li').hasClass('dropdown-submenu')) {
e.stopPropagation();
return false;
}
} else if (e.keyCode == Common.UI.Keys.UP || e.keyCode == Common.UI.Keys.DOWN) {
this.fromKeyDown = true;

View file

@ -593,7 +593,7 @@ define([
this.setLongActionView(action)
} else {
var me = this;
if (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) {
if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && !this.appOptions.isOffline) {
if (this._state.fastCoauth && this._state.usersCount>1) {
me._state.timerSave = setTimeout(function () {
me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
@ -631,8 +631,8 @@ define([
case Asc.c_oAscAsyncAction['ForceSaveButton']:
clearTimeout(this._state.timerSave);
force = true;
title = this.saveTitleText;
text = this.saveTextText;
title = (!this.appOptions.isOffline) ? this.saveTitleText : '';
text = (!this.appOptions.isOffline) ? this.saveTextText : '';
break;
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -229,19 +229,19 @@
}
.surface-normal{
background-position: -100px -200px;
background-position: 0px -300px;
}
.surface-wireframe{
background-position: -100px -200px;
background-position: -50px -300px;
}
.contour-normal{
background-position: -100px -200px;
background-position: -100px -300px;
}
.contour-wireframe{
background-position: -100px -200px;
background-position: -150px -300px;
}
@toolbar-icon-size: 20px;

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

@ -413,7 +413,7 @@ define([
if (action) {
this.setLongActionView(action)
} else {
if (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) {
if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && !this.appOptions.isOffline) {
if (this._state.fastCoauth && this._state.usersCount>1) {
var me = this;
me._state.timerSave = setTimeout(function () {
@ -451,8 +451,8 @@ define([
case Asc.c_oAscAsyncAction['ForceSaveButton']:
clearTimeout(this._state.timerSave);
force = true;
// title = this.saveTitleText;
// text = this.saveTextText;
// title = (!this.appOptions.isOffline) ? this.saveTitleText : '';
// text = (!this.appOptions.isOffline) ? this.saveTextText : '';
break;
case Asc.c_oAscAsyncAction['ForceSaveTimeout']:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -223,19 +223,19 @@
}
.surface-normal{
background-position: -100px -200px;
background-position: 0px -300px;
}
.surface-wireframe{
background-position: -100px -200px;
background-position: -50px -300px;
}
.contour-normal{
background-position: -100px -200px;
background-position: -100px -300px;
}
.contour-wireframe{
background-position: -100px -200px;
background-position: -150px -300px;
}
@toolbar-icon-size: 20px;

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;
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -314,19 +314,19 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px -
}
.surface-normal{
background-position: -100px -200px;
background-position: 0px -300px;
}
.surface-wireframe{
background-position: -100px -200px;
background-position: -50px -300px;
}
.contour-normal{
background-position: -100px -200px;
background-position: -100px -300px;
}
.contour-wireframe{
background-position: -100px -200px;
background-position: -150px -300px;
}
#table-combo-template .combo-dataview{

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');