From 0096094d8fd755a5e693c1304786fb299ee0ffdd Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 14 Mar 2018 14:55:53 +0300 Subject: [PATCH] [DE] Hide menu for table of contents --- apps/documenteditor/main/app/controller/Links.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index 64596eade..be149577f 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -316,10 +316,11 @@ define([ onShowContentControlsActions: function(action, x, y) { var menu = (action==1) ? this.view.contentsUpdateMenu : this.view.contentsMenu, documentHolderView = this.getApplication().getController('DocumentHolder').documentHolder, - menuContainer = documentHolderView.cmpEl.find(Common.Utils.String.format('#menu-container-{0}', menu.id)); + menuContainer = documentHolderView.cmpEl.find(Common.Utils.String.format('#menu-container-{0}', menu.id)), + me = this; if (!menu) return; - + this._fromShowContentControls = true; Common.UI.Menu.Manager.hideAll(); if (!menu.rendered) { @@ -331,6 +332,10 @@ define([ menu.render(menuContainer); menu.cmpEl.attr({tabindex: "-1"}); + menu.on('hide:after', function(){ + if (!me._fromShowContentControls) + me.api.asc_UncheckContentControlButtons(); + }); } menuContainer.css({left: x, top : y}); @@ -342,6 +347,7 @@ define([ _.delay(function() { menu.cmpEl.focus(); }, 10); + this._fromShowContentControls = false; }, onHideContentControlsActions: function() {