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';
51 iconCls += ((this.icon) ? (' ' + this.icon) : (' step-number')) ;
55 cls: 'roo-navigation-bar-item',
68 cfg.cls += ' disabled';
76 this.setDisabled(true);
81 this.setDisabled(false);
84 initEvents: function()
86 this.iconEl = this.el.select('.roo-navigation-bar-item-icon', true).first();
88 this.iconEl.on('click', this.onClick, this);
99 if(this.fireEvent('click', this, e) === false){
103 this.parent().setActiveItem(this);
106 isActive: function ()
111 setActive : function(state)
113 if(this.active == state){
120 this.el.addClass('active');
124 this.el.removeClass('active');
129 setDisabled : function(state)
131 if(this.disabled == state){
135 this.disabled = state;
138 this.el.addClass('disabled');
142 this.el.removeClass('disabled');
145 tooltipEl : function()
147 return this.el.select('.roo-navigation-bar-item-icon', true).first();;