allow string based values for comboboxarray
[roojs1] / Roo / bootstrap / NavProgressBar.js
index ab15508..7afa07c 100644 (file)
@@ -53,11 +53,11 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
                 },
                 {
                     tag : 'div',
-                    cls : 'roo-navigation-bar',
+                    cls : 'roo-navigation-bullets-bar',
                     cn : [
                         {
                             tag : 'ul',
-                            cls : 'roo-navigation-bar-list'
+                            cls : 'roo-navigation-bar'
                         }
                     ]
                 },
@@ -76,7 +76,7 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
     
     initEvents: function() 
     {
-        this.format();
+        
     },
     
     onRender : function(ct, position) 
@@ -89,6 +89,8 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
             }, this);
         }
         
+        this.format();
+        
     },
     
     addItem : function(cfg)
@@ -96,23 +98,34 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
         var item = new Roo.bootstrap.NavProgressItem(cfg);
         
         item.parentId = this.id;
-        item.render(this.el.select('.roo-navigation-bar-list', true).first(), null);
+        item.render(this.el.select('.roo-navigation-bar', true).first(), null);
         
         if(cfg.html){
             var top = new Roo.bootstrap.Element({
                 tag : 'div',
-                cls : 'roo-navigation-bar-text',
-                html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? cfg.html : ''
+                cls : 'roo-navigation-bar-text'
             });
             
             var bottom = new Roo.bootstrap.Element({
                 tag : 'div',
-                cls : 'roo-navigation-bar-text',
+                cls : 'roo-navigation-bar-text'
+            });
+            
+            top.onRender(this.el.select('.roo-navigation-top-bar', true).first(), null);
+            bottom.onRender(this.el.select('.roo-navigation-bottom-bar', true).first(), null);
+            
+            var topText = new Roo.bootstrap.Element({
+                tag : 'span',
+                html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? cfg.html : ''
+            });
+            
+            var bottomText = new Roo.bootstrap.Element({
+                tag : 'span',
                 html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? '' : cfg.html
             });
             
-            top.onRender(this.el.select('.roo-navigation-bar-top', true).first(), null);
-            bottom.onRender(this.el.select('.roo-navigation-bar-bottom', true).first(), null);
+            topText.onRender(top.el, null);
+            bottomText.onRender(bottom.el, null);
             
             item.topEl = top;
             item.bottomEl = bottom;
@@ -221,7 +234,7 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
         if(!this.barItems.length){
             return;
         }
-        
+     
         var width = 100 / this.barItems.length;
         
         Roo.each(this.barItems, function(i){