allow string based values for comboboxarray
[roojs1] / Roo / bootstrap / NavProgressItem.js
index 49dca18..5c4ceeb 100644 (file)
@@ -15,7 +15,6 @@
  * @cfg {String} html
  * @cfg {String} position (top|bottom) text position default bottom
  * @cfg {String} icon show icon instead of number
- * @cfg {Boolean} forceIcon (true|false) true to force show icon..if set to false, Roo.isTouch showing icon, otherwish number
  * 
  * @constructor
  * Create a new NavProgressItem
@@ -44,15 +43,12 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
     html : '',
     position : 'bottom',
     icon : false,
-    forceIcon : false,
     
     getAutoCreate : function()
     {
         var iconCls = 'roo-navigation-bar-item-icon';
         
-        if((this.forceIcon && this.icon) || !this.forceIcon && Roo.isTouch){
-            iconCls += ' ' + this.icon;
-        }
+        iconCls += ((this.icon) ? (' ' + this.icon) : (' step-number')) ;
         
         var cfg = {
             tag: 'li',
@@ -61,14 +57,9 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
                 {
                     tag : 'i',
                     cls : iconCls
-                },
-                {
-                    tag : 'span',
-                    cls : 'roo-navigation-bar-item-text ' + this.position,
-                    html : this.html
                 }
             ]
-        }
+        };
         
         if(this.active){
             cfg.cls += ' active';
@@ -80,17 +71,21 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
         return cfg;
     },
     
+    disable : function()
+    {
+        this.setDisabled(true);
+    },
+    
+    enable : function()
+    {
+        this.setDisabled(false);
+    },
+    
     initEvents: function() 
     {
         this.iconEl = this.el.select('.roo-navigation-bar-item-icon', true).first();
-        this.textEl = this.el.select('.roo-navigation-bar-item-text', true).first();
-        
-        if(Roo.isTouch){
-            this.textEl.setVisibilityMode(Roo.Element.DISPLAY).hide();
-        }
         
         this.iconEl.on('click', this.onClick, this);
-        
     },
     
     onClick : function(e)
@@ -106,7 +101,6 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
         };
         
         this.parent().setActiveItem(this);
-        
     },
     
     isActive: function () 
@@ -150,7 +144,7 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
     
     tooltipEl : function()
     {
-        return this.iconEl;
+        return this.el.select('.roo-navigation-bar-item-icon', true).first();;
     }
 });