mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
Progressbar: Fix style issues
Closes gh-1493
This commit is contained in:
parent
adcc9680ec
commit
b99f5b305f
@ -16,11 +16,11 @@
|
|||||||
//>>css.structure: ../themes/base/progressbar.css
|
//>>css.structure: ../themes/base/progressbar.css
|
||||||
//>>css.theme: ../themes/base/theme.css
|
//>>css.theme: ../themes/base/theme.css
|
||||||
|
|
||||||
(function( factory ) {
|
( function( factory ) {
|
||||||
if ( typeof define === "function" && define.amd ) {
|
if ( typeof define === "function" && define.amd ) {
|
||||||
|
|
||||||
// AMD. Register as an anonymous module.
|
// AMD. Register as an anonymous module.
|
||||||
define([
|
define( [
|
||||||
"jquery",
|
"jquery",
|
||||||
"./core",
|
"./core",
|
||||||
"./widget"
|
"./widget"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
// Browser globals
|
// Browser globals
|
||||||
factory( jQuery );
|
factory( jQuery );
|
||||||
}
|
}
|
||||||
}(function( $ ) {
|
}( function( $ ) {
|
||||||
|
|
||||||
return $.widget( "ui.progressbar", {
|
return $.widget( "ui.progressbar", {
|
||||||
version: "@VERSION",
|
version: "@VERSION",
|
||||||
@ -54,13 +54,13 @@ return $.widget( "ui.progressbar", {
|
|||||||
// Constrain initial value
|
// Constrain initial value
|
||||||
this.oldValue = this.options.value = this._constrainedValue();
|
this.oldValue = this.options.value = this._constrainedValue();
|
||||||
|
|
||||||
this.element.attr({
|
this.element.attr( {
|
||||||
|
|
||||||
// Only set static values; aria-valuenow and aria-valuemax are
|
// Only set static values; aria-valuenow and aria-valuemax are
|
||||||
// set inside _refreshValue()
|
// set inside _refreshValue()
|
||||||
role: "progressbar",
|
role: "progressbar",
|
||||||
"aria-valuemin": this.min
|
"aria-valuemin": this.min
|
||||||
});
|
} );
|
||||||
this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
|
this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
|
||||||
|
|
||||||
this.valueDiv = $( "<div>" ).appendTo( this.element );
|
this.valueDiv = $( "<div>" ).appendTo( this.element );
|
||||||
@ -136,7 +136,7 @@ return $.widget( "ui.progressbar", {
|
|||||||
|
|
||||||
this.valueDiv
|
this.valueDiv
|
||||||
.toggle( this.indeterminate || value > this.min )
|
.toggle( this.indeterminate || value > this.min )
|
||||||
.width( percentage.toFixed(0) + "%" );
|
.width( percentage.toFixed( 0 ) + "%" );
|
||||||
|
|
||||||
this
|
this
|
||||||
._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
|
._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
|
||||||
@ -150,10 +150,10 @@ return $.widget( "ui.progressbar", {
|
|||||||
this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
|
this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.element.attr({
|
this.element.attr( {
|
||||||
"aria-valuemax": this.options.max,
|
"aria-valuemax": this.options.max,
|
||||||
"aria-valuenow": value
|
"aria-valuenow": value
|
||||||
});
|
} );
|
||||||
if ( this.overlayDiv ) {
|
if ( this.overlayDiv ) {
|
||||||
this.overlayDiv.remove();
|
this.overlayDiv.remove();
|
||||||
this.overlayDiv = null;
|
this.overlayDiv = null;
|
||||||
@ -168,6 +168,6 @@ return $.widget( "ui.progressbar", {
|
|||||||
this._trigger( "complete" );
|
this._trigger( "complete" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
} );
|
||||||
|
|
||||||
}));
|
} ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user