From 0875b47babd868a10de9cdb1c15f231bacef87ba Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 20 Apr 2017 13:29:44 +0300 Subject: [PATCH] [DE] debug "FileMenu" --- apps/documenteditor/main/app/controller/LeftMenu.js | 11 ++++++++--- apps/documenteditor/main/app/view/LeftMenu.js | 5 ----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 6d6d824de..ebbd24fc0 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -353,7 +353,7 @@ define([ clickToolbarTab: function (tab, e) { if (tab == 'file') this.leftMenu.showMenu('file'); else - this.leftMenu.close(); + this.leftMenu.menuFile.hide(); }, /** coauthoring begin **/ @@ -577,6 +577,11 @@ define([ return false; case 'escape': // if (!this.leftMenu.isOpened()) return true; + if ( this.leftMenu.menuFile.isVisible() ) { + this.leftMenu.menuFile.hide(); + return false; + } + var statusbar = DE.getController('Statusbar'); var menu_opened = statusbar.statusbar.$el.find('.open > [data-toggle="dropdown"]'); if (menu_opened.length) { @@ -590,8 +595,8 @@ define([ return false; } } - if (this.leftMenu.menuFile.isVisible() || this.leftMenu.btnAbout.pressed || this.leftMenu.btnPlugins.pressed || - $(e.target).parents('#left-menu').length ) { + if (this.leftMenu.btnAbout.pressed || this.leftMenu.btnPlugins.pressed || + $(e.target).parents('#left-menu').length ) { this.leftMenu.close(); Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); return false; diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index 7cc124d6c..99fa46f19 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -178,10 +178,6 @@ define([ this.supressEvents = true; this.btnAbout.toggle(false); - if ( this.menuFile.isVisible() ) { - this.menuFile.hide(); - } - if (btn.options.action == 'search') { } else { if (btn.pressed) { @@ -259,7 +255,6 @@ define([ if ( this.menuFile.isVisible() ) { this.menuFile.hide(); } else { - this.btnAbout.toggle(false); this.$el.width(SCALE_MIN); /** coauthoring begin **/