From d2f949fc39f8b10d3e016825c39a88ec344c47f8 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 11 Apr 2017 17:07:46 +0300 Subject: [PATCH] Fix Bug 33669. --- apps/common/main/lib/component/Button.js | 6 ++++-- .../documenteditor/main/app/view/RightMenu.js | 21 ++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 7b06a4e47..8c48f09e0 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -476,14 +476,16 @@ define([ setDisabled: function(disabled) { if (this.rendered && this.disabled != disabled) { var el = this.cmpEl, - isGroup = el.hasClass('btn-group'); + isGroup = el.hasClass('btn-group'), + me = this; disabled = (disabled===true); if (disabled !== el.hasClass('disabled')) { var decorateBtn = function(button) { button.toggleClass('disabled', disabled); - (disabled) ? button.attr({disabled: disabled}) : button.removeAttr('disabled'); + if (!me.options.allowMouseEventsOnDisabled) + (disabled) ? button.attr({disabled: disabled}) : button.removeAttr('disabled'); }; decorateBtn(el); diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index 2f76f37d2..018f957dd 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -79,42 +79,48 @@ define([ asctype: Common.Utils.documentSettingsType.Paragraph, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this.btnTable = new Common.UI.Button({ hint: this.txtTableSettings, asctype: Common.Utils.documentSettingsType.Table, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this.btnImage = new Common.UI.Button({ hint: this.txtImageSettings, asctype: Common.Utils.documentSettingsType.Image, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this.btnHeaderFooter = new Common.UI.Button({ hint: this.txtHeaderFooterSettings, asctype: Common.Utils.documentSettingsType.Header, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this.btnChart = new Common.UI.Button({ hint: this.txtChartSettings, asctype: Common.Utils.documentSettingsType.Chart, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this.btnShape = new Common.UI.Button({ hint: this.txtShapeSettings, asctype: Common.Utils.documentSettingsType.Shape, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this.btnTextArt = new Common.UI.Button({ @@ -122,7 +128,8 @@ define([ asctype: Common.Utils.documentSettingsType.TextArt, enableToggle: true, disabled: true, - toggleGroup: 'tabpanelbtnsGroup' + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true }); this._settings = [];