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';
53 // if((this.forceIcon)){
54 // iconCls += ' force';
59 iconCls += (this.icon) ? (' ' + this.icon) : (' step-number') ;
64 cls: 'roo-navigation-bar-item',
77 cfg.cls += ' disabled';
85 this.setDisabled(true);
90 this.setDisabled(false);
93 initEvents: function()
95 this.iconEl = this.el.select('.roo-navigation-bar-item-icon', true).first();
97 this.iconEl.on('click', this.onClick, this);
100 onClick : function(e)
108 if(this.fireEvent('click', this, e) === false){
112 this.parent().setActiveItem(this);
115 isActive: function ()
120 setActive : function(state)
122 if(this.active == state){
129 this.el.addClass('active');
133 this.el.removeClass('active');
138 setDisabled : function(state)
140 if(this.disabled == state){
144 this.disabled = state;
147 this.el.addClass('disabled');
151 this.el.removeClass('disabled');
154 tooltipEl : function()
156 return this.el.select('.roo-navigation-bar-item-icon', true).first();;