Last change
on this file since 24245 was 24245, checked in by sjb48, 13 years ago |
Oran code for supporting format changes to document.
|
-
Property svn:executable
set to
*
|
File size:
1.8 KB
|
Line | |
---|
1 | /*
|
---|
2 | * jQuery UI Progressbar 1.8rc1
|
---|
3 | *
|
---|
4 | * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
---|
5 | * Dual licensed under the MIT (MIT-LICENSE.txt)
|
---|
6 | * and GPL (GPL-LICENSE.txt) licenses.
|
---|
7 | *
|
---|
8 | * http://docs.jquery.com/UI/Progressbar
|
---|
9 | *
|
---|
10 | * Depends:
|
---|
11 | * jquery.ui.core.js
|
---|
12 | * jquery.ui.widget.js
|
---|
13 | */
|
---|
14 | (function(a){a.widget("ui.progressbar",{options:{value:0},_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);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").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments);return this},value:function(b){if(b===undefined){return this._value()}this._setOption("value",b);return this},_setOption:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var b=this.options.value;if(typeof b!="number"){b=0}if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.8rc1"})})(jQuery); |
---|
Note:
See
TracBrowser
for help on using the repository browser.