Skip to content
Permalink
Browse files

Progressbar: Handle disabled option on create, using _setOptionDisabled

Ref #9151
Ref gh-1599
  • Loading branch information
jzaefferer authored and scottgonzalez committed Sep 25, 2015
1 parent 8d03121 commit 7ceaa618421dc2be3bdb5f5cf8f62d499e982244
Showing with 7 additions and 4 deletions.
  1. +7 −4 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 );
},

0 comments on commit 7ceaa61

Please sign in to comment.
You can’t perform that action at this time.