Skip to content

Progressbar: Fix style issues #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ui/progressbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
//>>css.structure: ../themes/base/progressbar.css
//>>css.theme: ../themes/base/theme.css

(function( factory ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define([
define( [
"jquery",
"./core",
"./widget"
Expand All @@ -30,7 +30,7 @@
// Browser globals
factory( jQuery );
}
}(function( $ ) {
}( function( $ ) {

return $.widget( "ui.progressbar", {
version: "@VERSION",
Expand All @@ -54,13 +54,13 @@ return $.widget( "ui.progressbar", {
// Constrain initial value
this.oldValue = this.options.value = this._constrainedValue();

this.element.attr({
this.element.attr( {

// Only set static values; aria-valuenow and aria-valuemax are
// set inside _refreshValue()
role: "progressbar",
"aria-valuemin": this.min
});
} );
this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );

this.valueDiv = $( "<div>" ).appendTo( this.element );
Expand Down Expand Up @@ -136,7 +136,7 @@ return $.widget( "ui.progressbar", {

this.valueDiv
.toggle( this.indeterminate || value > this.min )
.width( percentage.toFixed(0) + "%" );
.width( percentage.toFixed( 0 ) + "%" );

this
._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
Expand All @@ -150,10 +150,10 @@ return $.widget( "ui.progressbar", {
this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
}
} else {
this.element.attr({
this.element.attr( {
"aria-valuemax": this.options.max,
"aria-valuenow": value
});
} );
if ( this.overlayDiv ) {
this.overlayDiv.remove();
this.overlayDiv = null;
Expand All @@ -168,6 +168,6 @@ return $.widget( "ui.progressbar", {
this._trigger( "complete" );
}
}
});
} );

}));
} ) );