diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index b58daa032..74bc96275 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -545,6 +545,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; if (!this.rendered) diff --git a/apps/common/main/lib/component/ComboDataView.js b/apps/common/main/lib/component/ComboDataView.js index 6597591ba..ee482b9e7 100644 --- a/apps/common/main/lib/component/ComboDataView.js +++ b/apps/common/main/lib/component/ComboDataView.js @@ -380,6 +380,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; if (!this.rendered) diff --git a/apps/common/main/lib/component/ComboDataViewShape.js b/apps/common/main/lib/component/ComboDataViewShape.js index 3b0d4f758..f6737f9a4 100644 --- a/apps/common/main/lib/component/ComboDataViewShape.js +++ b/apps/common/main/lib/component/ComboDataViewShape.js @@ -439,6 +439,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; if (!this.rendered) diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index ad768a748..5317ed5d6 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -763,6 +763,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; $(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled); }, @@ -1237,6 +1238,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; $(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled); }, diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 2ba3f7653..28f1d30b6 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -299,6 +299,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; $(this.el).toggleClass('disabled', disabled); disabled @@ -525,6 +526,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; $(this.el).toggleClass('disabled', disabled); disabled diff --git a/apps/common/main/lib/component/MetricSpinner.js b/apps/common/main/lib/component/MetricSpinner.js index 3ebe658c6..b70974942 100644 --- a/apps/common/main/lib/component/MetricSpinner.js +++ b/apps/common/main/lib/component/MetricSpinner.js @@ -206,6 +206,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; var el = this.$el || $(this.el); if (disabled !== this.disabled) { el.find('button').toggleClass('disabled', disabled); diff --git a/apps/common/main/lib/component/RadioBox.js b/apps/common/main/lib/component/RadioBox.js index c523d0f96..f596e864b 100644 --- a/apps/common/main/lib/component/RadioBox.js +++ b/apps/common/main/lib/component/RadioBox.js @@ -133,6 +133,7 @@ define([ if (!this.rendered) return; + disabled = !!disabled; if (disabled !== this.disabled) { this.$label.toggleClass('disabled', disabled); this.$radio.toggleClass('disabled', disabled); diff --git a/apps/common/main/lib/component/Slider.js b/apps/common/main/lib/component/Slider.js index 9a79c6884..492cf8f66 100644 --- a/apps/common/main/lib/component/Slider.js +++ b/apps/common/main/lib/component/Slider.js @@ -272,6 +272,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; if (disabled !== this.disabled) this.cmpEl.toggleClass('disabled', disabled); this.disabled = disabled; @@ -588,6 +589,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; if (disabled !== this.disabled) this.cmpEl.toggleClass('disabled', disabled); this.disabled = disabled; diff --git a/apps/common/main/lib/component/TextareaField.js b/apps/common/main/lib/component/TextareaField.js index 478b9b649..b39933641 100644 --- a/apps/common/main/lib/component/TextareaField.js +++ b/apps/common/main/lib/component/TextareaField.js @@ -183,6 +183,7 @@ define([ }, setDisabled: function(disabled) { + disabled = !!disabled; this.disabled = disabled; $(this.el).toggleClass('disabled', disabled); disabled