[DE, PE] tab 'File' didn't select after 'FileMenu' opened programmatically

This commit is contained in:
Maxim Kadushkin 2017-04-27 17:34:34 +03:00
parent fe3bd89aa9
commit ac59e8b46e
4 changed files with 18 additions and 9 deletions

View file

@ -109,9 +109,8 @@ define([
'change:compact' : this.onClickChangeCompact
},
'FileMenu': {
'filemenu:hide': function () {
this.toolbar.setTab('');
}.bind(this)
'menu:hide': this.onFileMenu.bind(this, 'hide'),
'menu:show': this.onFileMenu.bind(this, 'show')
}
});
@ -1425,7 +1424,6 @@ define([
},
onAdvSettingsClick: function(btn, e) {
this.toolbar.setTab('file');
this.toolbar.fireEvent('file:settings', this);
btn.cmpEl.blur();
},
@ -2831,6 +2829,10 @@ define([
return !name ? this.toolbar : Backbone.Controller.prototype.getView.apply(this, arguments);
},
onFileMenu: function (opts) {
this.toolbar.setTab( opts == 'show' ? 'file' : undefined );
},
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 100',

View file

@ -200,12 +200,14 @@ define([
this.$el.show();
this.selectMenu(panel, opts);
this.api.asc_enableKeyEvents(false);
this.fireEvent('menu:show', [this]);
},
hide: function() {
this.$el.hide();
// if (this.mode.isEdit) DE.getController('Toolbar').DisableToolbar(false);
this.fireEvent('filemenu:hide', [this]);
this.fireEvent('menu:hide', [this]);
// this.api.asc_enableKeyEvents(true);
},

View file

@ -121,9 +121,8 @@ define([
'change:compact' : this.onClickChangeCompact
},
'FileMenu': {
'filemenu:hide': function () {
this.toolbar.setTab('');
}.bind(this)
'menu:hide': this.onFileMenu.bind(this, 'hide'),
'menu:show': this.onFileMenu.bind(this, 'show')
}
});
@ -2098,6 +2097,10 @@ define([
});
},
onFileMenu: function (opts) {
this.toolbar.setTab( opts == 'show' ? 'file' : undefined );
},
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
textFontSizeErr : 'The entered value must be more than 0',

View file

@ -197,11 +197,13 @@ define([
this.$el.show();
this.selectMenu(panel);
this.api.asc_enableKeyEvents(false);
this.fireEvent('menu:show', [this]);
},
hide: function() {
this.$el.hide();
this.fireEvent('filemenu:hide', [this]);
this.fireEvent('menu:hide', [this]);
this.api.asc_enableKeyEvents(true);
},