Skip to content
Permalink
Browse files

Progressbar: Removed text method.

  • Loading branch information...
scottgonzalez committed Nov 18, 2008
1 parent 291202d commit ce69e7ced4e8786ca5164372007c48a11ba90e72
Showing with 15 additions and 5 deletions.
  1. +15 −5 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);
}
});

0 comments on commit ce69e7c

Please sign in to comment.
You can’t perform that action at this time.