Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4100555
jquery.ui.progressbar.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
jquery.ui.progressbar.js
View Options
/*!
* jQuery UI Progressbar 1.9.2
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/progressbar/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(
function
(
$
,
undefined
)
{
$
.
widget
(
"ui.progressbar"
,
{
version
:
"1.9.2"
,
options
:
{
value
:
0
,
max
:
100
},
min
:
0
,
_create
:
function
()
{
this
.
element
.
addClass
(
"ui-progressbar ui-widget ui-widget-content ui-corner-all"
)
.
attr
({
role
:
"progressbar"
,
"aria-valuemin"
:
this
.
min
,
"aria-valuemax"
:
this
.
options
.
max
,
"aria-valuenow"
:
this
.
_value
()
});
this
.
valueDiv
=
$
(
"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>"
)
.
appendTo
(
this
.
element
);
this
.
oldValue
=
this
.
_value
();
this
.
_refreshValue
();
},
_destroy
:
function
()
{
this
.
element
.
removeClass
(
"ui-progressbar ui-widget ui-widget-content ui-corner-all"
)
.
removeAttr
(
"role"
)
.
removeAttr
(
"aria-valuemin"
)
.
removeAttr
(
"aria-valuemax"
)
.
removeAttr
(
"aria-valuenow"
);
this
.
valueDiv
.
remove
();
},
value
:
function
(
newValue
)
{
if
(
newValue
===
undefined
)
{
return
this
.
_value
();
}
this
.
_setOption
(
"value"
,
newValue
);
return
this
;
},
_setOption
:
function
(
key
,
value
)
{
if
(
key
===
"value"
)
{
this
.
options
.
value
=
value
;
this
.
_refreshValue
();
if
(
this
.
_value
()
===
this
.
options
.
max
)
{
this
.
_trigger
(
"complete"
);
}
}
this
.
_super
(
key
,
value
);
},
_value
:
function
()
{
var
val
=
this
.
options
.
value
;
// normalize invalid value
if
(
typeof
val
!==
"number"
)
{
val
=
0
;
}
return
Math
.
min
(
this
.
options
.
max
,
Math
.
max
(
this
.
min
,
val
)
);
},
_percentage
:
function
()
{
return
100
*
this
.
_value
()
/
this
.
options
.
max
;
},
_refreshValue
:
function
()
{
var
value
=
this
.
value
(),
percentage
=
this
.
_percentage
();
if
(
this
.
oldValue
!==
value
)
{
this
.
oldValue
=
value
;
this
.
_trigger
(
"change"
);
}
this
.
valueDiv
.
toggle
(
value
>
this
.
min
)
.
toggleClass
(
"ui-corner-right"
,
value
===
this
.
options
.
max
)
.
width
(
percentage
.
toFixed
(
0
)
+
"%"
);
this
.
element
.
attr
(
"aria-valuenow"
,
value
);
}
});
})(
jQuery
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 18, 16:29 (3 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
11/50/b4f2c793e85eb5560861df5bc35d
Default Alt Text
jquery.ui.progressbar.js (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment