aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2015-09-21 12:55:33 +0200
committerScott González <scott.gonzalez@gmail.com>2015-09-25 13:47:07 -0400
commit7ceaa618421dc2be3bdb5f5cf8f62d499e982244 (patch)
tree1460164c2937e60fd8fb5b8bf5a7f3813ca94b28 /ui/widgets
parent8d031215c6cf62f6fc6d9c9257d1e3c2d4f8b24a (diff)
downloadjquery-ui-7ceaa618421dc2be3bdb5f5cf8f62d499e982244.tar.gz
jquery-ui-7ceaa618421dc2be3bdb5f5cf8f62d499e982244.zip
Progressbar: Handle disabled option on create, using _setOptionDisabled
Ref #9151 Ref gh-1599
Diffstat (limited to 'ui/widgets')
-rw-r--r--ui/widgets/progressbar.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/widgets/progressbar.js b/ui/widgets/progressbar.js
index b2c7259ba..7e2695994 100644
--- a/ui/widgets/progressbar.js
+++ b/ui/widgets/progressbar.js
@@ -117,13 +117,16 @@ return $.widget( "ui.progressbar", {
// Don't allow a max less than min
value = Math.max( this.min, value );
}
- if ( key === "disabled" ) {
- this.element.attr( "aria-disabled", value );
- this._toggleClass( null, "ui-state-disabled", !!value );
- }
this._super( key, value );
},
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this.element.attr( "aria-disabled", value );
+ this._toggleClass( null, "ui-state-disabled", !!value );
+ },
+
_percentage: function() {
return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
},