Skip to content

Commit 357c4d4

Browse files
committed
Progressbar: Implement new _addClass api
1 parent a03428a commit 357c4d4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

ui/progressbar.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ return $.widget( "ui.progressbar", {
5353
role: "progressbar",
5454
"aria-valuemin": this.min
5555
});
56-
this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
56+
this._addClass( "ui-progressbar ui-widget ui-widget-content" );
5757

5858
this.valueDiv = $( "<div>" ).appendTo( this.element );
59-
this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
59+
this._addClass( this.valueDiv, "ui-progressbar-value ui-widget-header" );
6060
this._refreshValue();
6161
},
6262

@@ -67,8 +67,6 @@ return $.widget( "ui.progressbar", {
6767
.removeAttr( "aria-valuemax" )
6868
.removeAttr( "aria-valuenow" );
6969

70-
this._removeClass( "ui-progressbar", "ui-widget ui-widget-content" );
71-
7270
this.valueDiv.remove();
7371
},
7472

@@ -114,9 +112,8 @@ return $.widget( "ui.progressbar", {
114112
value = Math.max( this.min, value );
115113
}
116114
if ( key === "disabled" ) {
117-
this.element
118-
.toggleClass( "ui-state-disabled", !!value )
119-
.attr( "aria-disabled", value );
115+
this.element.attr( "aria-disabled", value );
116+
this[ ( !!value ? "_add" : "_remove" ) + "Class" ]( "ui-state-disabled" );
120117
}
121118
this._super( key, value );
122119
},

0 commit comments

Comments
 (0)