Fix #6464 - card header
[roojs1] / Roo / bootstrap / NavProgressItem.js
index b90ad6e..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,54 +71,21 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
         return cfg;
     },
     
-    render : function(container, position){
-        if(!this.rendered && this.fireEvent("beforerender", this) !== false){
-            if(!container && this.el){
-                this.el = Roo.get(this.el);
-                container = this.el.dom.parentNode;
-                this.allowDomMove = false;
-            }
-            this.container = Roo.get(container);
-            this.rendered = true;
-            if(position !== undefined){
-                if(typeof position == 'number'){
-                    position = this.container.dom.childNodes[position];
-                }else{
-                    position = Roo.getDom(position);
-                }
-            }
-            this.onRender(this.container, position || null);
-            if(this.cls){
-                this.el.addClass(this.cls);
-                delete this.cls;
-            }
-            if(this.style){
-                this.el.applyStyles(this.style);
-                delete this.style;
-            }
-            this.fireEvent("render", this);
-            this.afterRender(this.container);
-            if(this.hidden){
-                this.hide();
-            }
-            if(this.disabled){
-                this.disable();
-            }
-        }
-        return this;
+    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)