aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.progressbar.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-11-18 02:22:30 +0000
committerScott González <scott.gonzalez@gmail.com>2008-11-18 02:22:30 +0000
commitce69e7ced4e8786ca5164372007c48a11ba90e72 (patch)
tree83aa27c5af50809a659062cc26dd735687309a4c /ui/ui.progressbar.js
parent291202dabe4dbb708d1cff5c35e13770e191d82f (diff)
downloadjquery-ui-ce69e7ced4e8786ca5164372007c48a11ba90e72.tar.gz
jquery-ui-ce69e7ced4e8786ca5164372007c48a11ba90e72.zip
Progressbar: Removed text method.
Diffstat (limited to 'ui/ui.progressbar.js')
-rw-r--r--ui/ui.progressbar.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/ui/ui.progressbar.js b/ui/ui.progressbar.js
index 676442d3b..9e758bd40 100644
--- a/ui/ui.progressbar.js
+++ b/ui/ui.progressbar.js
@@ -137,7 +137,7 @@ $.widget("ui.progressbar", {
var percent = Math.round(this.percentState);
if (this.options.range && !this.options.text) {
- this.text(percent + '%');
+ this._setText(percent + '%');
}
this.element.attr("aria-valuenow", percent);
this._trigger('progress', null, this.ui());
@@ -186,16 +186,26 @@ $.widget("ui.progressbar", {
this._trigger('stop', null, this.ui());
},
- text: function(text){
- this.textElement.add(this.textBg).html(text);
- },
-
ui: function() {
return {
options: this.options,
pixelState: this.pixelState,
percentState: this.percentState
};
+ },
+
+ _setData: function(key, value){
+ switch (key) {
+ case 'text':
+ this._setText(value);
+ break;
+ }
+
+ $.widget.prototype._setData.apply(this, arguments);
+ },
+
+ _setText: function(text){
+ this.textElement.add(this.textBg).html(text);
}
});