remove debugging code
[roojs1] / Roo / bootstrap / ProgressBar.js
index 35478ac..d0c0f3b 100644 (file)
@@ -36,14 +36,14 @@ Roo.extend(Roo.bootstrap.ProgressBar, Roo.bootstrap.Component,  {
     panel : false,
     role : false,
     sr_only: false,
-    width : false,
     
-    getAutoCreate : function(){
+    getAutoCreate : function()
+    {
         
         var cfg = {
             tag: 'div',
             cls: 'progress-bar',
-            style: 'width:' + (this.aria_valuenow / this.aria_valuemax)
+            style: 'width:' + Math.ceil((this.aria_valuenow / this.aria_valuemax) * 100) + '%'
         };
         
         if(this.sr_only){
@@ -79,6 +79,13 @@ Roo.extend(Roo.bootstrap.ProgressBar, Roo.bootstrap.Component,  {
         }
         
         return cfg;
+    },
+    
+    update : function(aria_valuenow)
+    {
+        this.aria_valuenow = aria_valuenow;
+        
+        this.el.setStyle('width', Math.ceil((this.aria_valuenow / this.aria_valuemax) * 100) + '%');
     }
    
 });