mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Progressbar: Handle disabled option on create, using _setOptionDisabled
Ref #9151 Ref gh-1599
This commit is contained in:
parent
8d031215c6
commit
7ceaa61842
@ -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 );
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user