9 * @class Roo.bootstrap.NavProgressItem
10 * @extends Roo.bootstrap.Component
11 * Bootstrap NavProgressItem class
12 * @cfg {String} rid the reference id
13 * @cfg {Boolean} active (true|false) Is item active default false
14 * @cfg {Boolean} disabled (true|false) Is item active default false
16 * @cfg {String} position (top|bottom) text position default bottom
17 * @cfg {String} icon show icon instead of number
18 * @cfg {Boolean} forceIcon (true|false) true to force show icon..
21 * Create a new NavProgressItem
22 * @param {Object} config The config object
24 Roo.bootstrap.NavProgressItem = function(config){
25 Roo.bootstrap.NavProgressItem.superclass.constructor.call(this, config);
30 * The raw click event for the entire grid.
31 * @param {Roo.bootstrap.NavProgressItem} this
32 * @param {Roo.EventObject} e
39 Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component, {
49 getAutoCreate : function()
51 var iconCls = 'roo-navigation-bar-item-icon';
54 iconCls += (this.icon) ? (' ' + this.icon) : (' step-number') ;
59 cls: 'roo-navigation-bar-item',
72 cfg.cls += ' disabled';
80 this.setDisabled(true);
85 this.setDisabled(false);
88 initEvents: function()
90 this.iconEl = this.el.select('.roo-navigation-bar-item-icon', true).first();
92 this.iconEl.on('click', this.onClick, this);
103 if(this.fireEvent('click', this, e) === false){
107 this.parent().setActiveItem(this);
110 isActive: function ()
115 setActive : function(state)
117 if(this.active == state){
124 this.el.addClass('active');
128 this.el.removeClass('active');
133 setDisabled : function(state)
135 if(this.disabled == state){
139 this.disabled = state;
142 this.el.addClass('disabled');
146 this.el.removeClass('disabled');
149 tooltipEl : function()
151 return this.el.select('.roo-navigation-bar-item-icon', true).first();;