diff options
author | Richard Worth <rdworth@gmail.com> | 2009-09-17 10:39:12 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2009-09-17 10:39:12 +0000 |
commit | e2d873e6f06c6d4539302653d63540ba0b6f5e48 (patch) | |
tree | cca59581cddd66b4fedcac6d09ae15e9fabf7837 /ui/ui.progressbar.js | |
parent | 79c433fcab0fa80347de326577a52f1ca22d1ae7 (diff) | |
download | jquery-ui-e2d873e6f06c6d4539302653d63540ba0b6f5e48.tar.gz jquery-ui-e2d873e6f06c6d4539302653d63540ba0b6f5e48.zip |
renamed all ui.*.js files to jquery.ui.*.js, all effects.*.js files to jquery.effects.*.js per announcement and discussion here http://groups.google.com/group/jquery-ui-dev/msg/d565a0c56e0cb935
Diffstat (limited to 'ui/ui.progressbar.js')
-rw-r--r-- | ui/ui.progressbar.js | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/ui/ui.progressbar.js b/ui/ui.progressbar.js deleted file mode 100644 index 328f8be42..000000000 --- a/ui/ui.progressbar.js +++ /dev/null @@ -1,119 +0,0 @@ -/* - * jQuery UI Progressbar @VERSION - * - * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Progressbar - * - * Depends: - * ui.core.js - */ -(function($) { - -$.widget("ui.progressbar", { - - _init: 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 = $('<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(); - - $.widget.prototype.destroy.apply(this, arguments); - - return this; - }, - - value: function(newValue) { - if (newValue === undefined) { - return this._value(); - } - - this._setData('value', newValue); - return this; - }, - - _setData: function(key, value) { - - switch (key) { - case 'value': - this.options.value = value; - this._refreshValue(); - this._trigger('change', null, {}); - break; - } - - $.widget.prototype._setData.apply(this, arguments); - - }, - - _value: function() { - var val = this.options.value; - // normalize invalid value - if (typeof val != "number") - val = 0; - if (val < this._valueMin()) val = this._valueMin(); - if (val > this._valueMax()) val = this._valueMax(); - - return val; - - }, - - _valueMin: function() { - var valueMin = 0; - return valueMin; - }, - - _valueMax: function() { - var valueMax = 100; - return valueMax; - }, - - _refreshValue: function() { - var value = this.value(); - this.valueDiv[value == this._valueMax() ? 'addClass' : 'removeClass']("ui-corner-right"); - this.valueDiv.width(value + '%'); - this.element.attr("aria-valuenow", value); - } - -}); - -$.extend($.ui.progressbar, { - version: "@VERSION", - defaults: { - value: 0 - } -}); - -})(jQuery); |