Slider: Remove redundant handling of disabled option on create

Ref #9151
Ref gh-1599
This commit is contained in:
Jörn Zaefferer 2015-09-21 13:04:08 +02:00 committed by Scott González
parent d2f62041f9
commit 897dc718c6

View File

@ -81,7 +81,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
"ui-widget ui-widget-content" ); "ui-widget ui-widget-content" );
this._refresh(); this._refresh();
this._setOption( "disabled", this.options.disabled );
this._animateOff = false; this._animateOff = false;
}, },
@ -430,10 +429,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
valsLength = this.options.values.length; valsLength = this.options.values.length;
} }
if ( key === "disabled" ) {
this._toggleClass( null, "ui-state-disabled", !!value );
}
this._super( key, value ); this._super( key, value );
switch ( key ) { switch ( key ) {
@ -481,6 +476,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
} }
}, },
_setOptionDisabled: function( value ) {
this._super( value );
this._toggleClass( null, "ui-state-disabled", !!value );
},
//internal value getter //internal value getter
// _value() returns value trimmed by min and max, aligned by step // _value() returns value trimmed by min and max, aligned by step
_value: function() { _value: function() {