Fix #6465 - drag drop for cards
[roojs1] / Roo / bootstrap / ProgressBar.js
index bab4ea2..d0c0f3b 100644 (file)
@@ -16,7 +16,6 @@
  * @cfg {String} panel (success | info | warning | danger )
  * @cfg {String} role role of the progress bar
  * @cfg {String} sr_only text
- * @cfg {Number} width percentages of the bar
  * 
  * 
  * @constructor
@@ -30,19 +29,21 @@ Roo.bootstrap.ProgressBar = function(config){
 
 Roo.extend(Roo.bootstrap.ProgressBar, Roo.bootstrap.Component,  {
     
-    aria_valuenow : false,
+    aria_valuenow : 0,
     aria_valuemin : 0,
     aria_valuemax : 100,
     label : false,
     panel : false,
     role : false,
     sr_only: false,
-    width : false,
     
-    getAutoCreate : function(){
+    getAutoCreate : function()
+    {
+        
         var cfg = {
             tag: 'div',
-            cls: 'progress-bar'
+            cls: 'progress-bar',
+            style: 'width:' + Math.ceil((this.aria_valuenow / this.aria_valuemax) * 100) + '%'
         };
         
         if(this.sr_only){
@@ -78,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) + '%');
     }
    
 });