* @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
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',
{
tag : 'i',
cls : iconCls
- },
- {
- tag : 'span',
- cls : 'roo-navigation-bar-item-text ' + this.position,
- html : this.html
}
]
- }
+ };
if(this.active){
cfg.cls += ' active';
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)