[DE][PE] Close toolbar menus when toolbar is collapsed. Collapse toolbar when document context menu is opened.
This commit is contained in:
parent
d503fd94fc
commit
293d08c2be
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'backbone',
|
'backbone'
|
||||||
], function (Backbone) {
|
], function (Backbone) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -169,7 +169,8 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
collapseToolbar: function() {
|
collapseToolbar: function() {
|
||||||
optsFold.$bar.removeClass('expanded');
|
optsFold.$bar && optsFold.$bar.removeClass('expanded');
|
||||||
|
Common.UI.Menu.Manager.hideAll();
|
||||||
},
|
},
|
||||||
|
|
||||||
expandToolbar: function() {
|
expandToolbar: function() {
|
||||||
|
|
|
@ -325,6 +325,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
|
this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
|
||||||
this.api.asc_registerCallback('asc_onColumnsProps', _.bind(this.onColumnsProps, this));
|
this.api.asc_registerCallback('asc_onColumnsProps', _.bind(this.onColumnsProps, this));
|
||||||
this.api.asc_registerCallback('asc_onSectionProps', _.bind(this.onSectionProps, this));
|
this.api.asc_registerCallback('asc_onSectionProps', _.bind(this.onSectionProps, this));
|
||||||
|
this.api.asc_registerCallback('asc_onContextMenu', _.bind(this.onContextMenu, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
onChangeCompactView: function(view, compact) {
|
onChangeCompactView: function(view, compact) {
|
||||||
|
@ -346,6 +347,10 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onContextMenu: function() {
|
||||||
|
this.toolbar.collapseToolbar();
|
||||||
|
},
|
||||||
|
|
||||||
onApiFontSize: function(size) {
|
onApiFontSize: function(size) {
|
||||||
if (this._state.fontsize !== size) {
|
if (this._state.fontsize !== size) {
|
||||||
this.toolbar.cmbFontSize.setValue(size);
|
this.toolbar.cmbFontSize.setValue(size);
|
||||||
|
|
|
@ -309,6 +309,7 @@ define([
|
||||||
|
|
||||||
this.api.asc_registerCallback('asc_onCountPages', _.bind(this.onApiCountPages, this));
|
this.api.asc_registerCallback('asc_onCountPages', _.bind(this.onApiCountPages, this));
|
||||||
this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
|
this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
|
||||||
|
this.api.asc_registerCallback('asc_onContextMenu', _.bind(this.onContextMenu, this));
|
||||||
|
|
||||||
this.onSetupCopyStyleButton();
|
this.onSetupCopyStyleButton();
|
||||||
},
|
},
|
||||||
|
@ -332,6 +333,10 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onContextMenu: function() {
|
||||||
|
this.toolbar.collapseToolbar();
|
||||||
|
},
|
||||||
|
|
||||||
onApiFontSize: function(size) {
|
onApiFontSize: function(size) {
|
||||||
if (this._state.fontsize !== size) {
|
if (this._state.fontsize !== size) {
|
||||||
this.toolbar.cmbFontSize.setValue(size);
|
this.toolbar.cmbFontSize.setValue(size);
|
||||||
|
|
Loading…
Reference in a new issue