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
20 * Create a new NavProgressItem
21 * @param {Object} config The config object
23 Roo.bootstrap.NavProgressItem = function(config){
24 Roo.bootstrap.NavProgressItem.superclass.constructor.call(this, config);
29 * The raw click event for the entire grid.
30 * @param {Roo.bootstrap.NavProgressItem} this
31 * @param {Roo.EventObject} e
38 Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component, {
47 getAutoCreate : function()
49 var iconCls = 'roo-navigation-bar-item-icon';
52 iconCls += (this.icon) ? (' ' + this.icon) : (' step-number') ;
57 cls: 'roo-navigation-bar-item',
70 cfg.cls += ' disabled';
78 this.setDisabled(true);
83 this.setDisabled(false);
86 initEvents: function()
88 this.iconEl = this.el.select('.roo-navigation-bar-item-icon', true).first();
90 this.iconEl.on('click', this.onClick, this);
101 if(this.fireEvent('click', this, e) === false){
105 this.parent().setActiveItem(this);
108 isActive: function ()
113 setActive : function(state)
115 if(this.active == state){
122 this.el.addClass('active');
126 this.el.removeClass('active');
131 setDisabled : function(state)
133 if(this.disabled == state){
137 this.disabled = state;
140 this.el.addClass('disabled');
144 this.el.removeClass('disabled');
147 tooltipEl : function()
149 return this.el.select('.roo-navigation-bar-item-icon', true).first();;