Commit fd7b6791 authored by Julia Radzhabova's avatar Julia Radzhabova

Fix Bug 33669.

parent 1092ea92
...@@ -416,14 +416,16 @@ define([ ...@@ -416,14 +416,16 @@ define([
setDisabled: function(disabled) { setDisabled: function(disabled) {
if (this.rendered && this.disabled != disabled) { if (this.rendered && this.disabled != disabled) {
var el = this.cmpEl, var el = this.cmpEl,
isGroup = el.hasClass('btn-group'); isGroup = el.hasClass('btn-group'),
me = this;
disabled = (disabled===true); disabled = (disabled===true);
if (disabled !== el.hasClass('disabled')) { if (disabled !== el.hasClass('disabled')) {
var decorateBtn = function(button) { var decorateBtn = function(button) {
button.toggleClass('disabled', disabled); 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); decorateBtn(el);
......
...@@ -79,42 +79,48 @@ define([ ...@@ -79,42 +79,48 @@ define([
asctype: Common.Utils.documentSettingsType.Paragraph, asctype: Common.Utils.documentSettingsType.Paragraph,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnTable = new Common.UI.Button({ this.btnTable = new Common.UI.Button({
hint: this.txtTableSettings, hint: this.txtTableSettings,
asctype: Common.Utils.documentSettingsType.Table, asctype: Common.Utils.documentSettingsType.Table,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnImage = new Common.UI.Button({ this.btnImage = new Common.UI.Button({
hint: this.txtImageSettings, hint: this.txtImageSettings,
asctype: Common.Utils.documentSettingsType.Image, asctype: Common.Utils.documentSettingsType.Image,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnHeaderFooter = new Common.UI.Button({ this.btnHeaderFooter = new Common.UI.Button({
hint: this.txtHeaderFooterSettings, hint: this.txtHeaderFooterSettings,
asctype: Common.Utils.documentSettingsType.Header, asctype: Common.Utils.documentSettingsType.Header,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnChart = new Common.UI.Button({ this.btnChart = new Common.UI.Button({
hint: this.txtChartSettings, hint: this.txtChartSettings,
asctype: Common.Utils.documentSettingsType.Chart, asctype: Common.Utils.documentSettingsType.Chart,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnShape = new Common.UI.Button({ this.btnShape = new Common.UI.Button({
hint: this.txtShapeSettings, hint: this.txtShapeSettings,
asctype: Common.Utils.documentSettingsType.Shape, asctype: Common.Utils.documentSettingsType.Shape,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnTextArt = new Common.UI.Button({ this.btnTextArt = new Common.UI.Button({
...@@ -122,7 +128,8 @@ define([ ...@@ -122,7 +128,8 @@ define([
asctype: Common.Utils.documentSettingsType.TextArt, asctype: Common.Utils.documentSettingsType.TextArt,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this._settings = []; this._settings = [];
......
...@@ -78,42 +78,48 @@ define([ ...@@ -78,42 +78,48 @@ define([
asctype: Common.Utils.documentSettingsType.Paragraph, asctype: Common.Utils.documentSettingsType.Paragraph,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnTable = new Common.UI.Button({ this.btnTable = new Common.UI.Button({
hint: this.txtTableSettings, hint: this.txtTableSettings,
asctype: Common.Utils.documentSettingsType.Table, asctype: Common.Utils.documentSettingsType.Table,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnImage = new Common.UI.Button({ this.btnImage = new Common.UI.Button({
hint: this.txtImageSettings, hint: this.txtImageSettings,
asctype: Common.Utils.documentSettingsType.Image, asctype: Common.Utils.documentSettingsType.Image,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnSlide = new Common.UI.Button({ this.btnSlide = new Common.UI.Button({
hint: this.txtSlideSettings, hint: this.txtSlideSettings,
asctype: Common.Utils.documentSettingsType.Slide, asctype: Common.Utils.documentSettingsType.Slide,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnChart = new Common.UI.Button({ this.btnChart = new Common.UI.Button({
hint: this.txtChartSettings, hint: this.txtChartSettings,
asctype: Common.Utils.documentSettingsType.Chart, asctype: Common.Utils.documentSettingsType.Chart,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnShape = new Common.UI.Button({ this.btnShape = new Common.UI.Button({
hint: this.txtShapeSettings, hint: this.txtShapeSettings,
asctype: Common.Utils.documentSettingsType.Shape, asctype: Common.Utils.documentSettingsType.Shape,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnTextArt = new Common.UI.Button({ this.btnTextArt = new Common.UI.Button({
...@@ -121,7 +127,8 @@ define([ ...@@ -121,7 +127,8 @@ define([
asctype: Common.Utils.documentSettingsType.TextArt, asctype: Common.Utils.documentSettingsType.TextArt,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this._settings = []; this._settings = [];
......
...@@ -77,28 +77,32 @@ define([ ...@@ -77,28 +77,32 @@ define([
asctype: Common.Utils.documentSettingsType.Paragraph, asctype: Common.Utils.documentSettingsType.Paragraph,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnImage = new Common.UI.Button({ this.btnImage = new Common.UI.Button({
hint: this.txtImageSettings, hint: this.txtImageSettings,
asctype: Common.Utils.documentSettingsType.Image, asctype: Common.Utils.documentSettingsType.Image,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnChart = new Common.UI.Button({ this.btnChart = new Common.UI.Button({
hint: this.txtChartSettings, hint: this.txtChartSettings,
asctype: Common.Utils.documentSettingsType.Chart, asctype: Common.Utils.documentSettingsType.Chart,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnShape = new Common.UI.Button({ this.btnShape = new Common.UI.Button({
hint: this.txtShapeSettings, hint: this.txtShapeSettings,
asctype: Common.Utils.documentSettingsType.Shape, asctype: Common.Utils.documentSettingsType.Shape,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnTextArt = new Common.UI.Button({ this.btnTextArt = new Common.UI.Button({
...@@ -106,7 +110,8 @@ define([ ...@@ -106,7 +110,8 @@ define([
asctype: Common.Utils.documentSettingsType.TextArt, asctype: Common.Utils.documentSettingsType.TextArt,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this.btnTable = new Common.UI.Button({ this.btnTable = new Common.UI.Button({
...@@ -114,7 +119,8 @@ define([ ...@@ -114,7 +119,8 @@ define([
asctype: Common.Utils.documentSettingsType.Table, asctype: Common.Utils.documentSettingsType.Table,
enableToggle: true, enableToggle: true,
disabled: true, disabled: true,
toggleGroup: 'tabpanelbtnsGroup' toggleGroup: 'tabpanelbtnsGroup',
allowMouseEventsOnDisabled: true
}); });
this._settings = []; this._settings = [];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment