r952 - trunk/ui

r952 - trunk/ui


Author: scott.gonzalez
Date: Mon Nov 17 18:22:30 2008
New Revision: 952
Modified:
trunk/ui/ui.progressbar.js
Log:
Progressbar: Removed text method.
Modified: trunk/ui/ui.progressbar.js
==============================================================================
--- trunk/ui/ui.progressbar.js    (original)
+++ trunk/ui/ui.progressbar.js    Mon Nov 17 18:22:30 2008
@@ -137,7 +137,7 @@
        
        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 @@
        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);
    }
});