diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 08f6a95813..c2e1af67b7 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -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.
Please enter a numeric value between 1 and 100', diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 9b9f2229de..d784ffb860 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -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); }, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index d2c14f98bc..c15d802179 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -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', diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 513122bb91..744a07a926 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -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); },