7 Roo.bootstrap.dash = Roo.bootstrap.dash || {};
10 * @class Roo.bootstrap.dash.TabBox
11 * @extends Roo.bootstrap.Component
12 * Bootstrap TabBox class
13 * @cfg {String} title Title of the TabBox
14 * @cfg {String} icon Icon of the TabBox
18 * @param {Object} config The config object
22 Roo.bootstrap.dash.TabBox = function(config){
23 Roo.bootstrap.dash.TabBox.superclass.constructor.call(this, config);
28 * When a pane is added
29 * @param {Roo.bootstrap.dash.TabPane} pane
36 Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component, {
41 getChildContainer : function()
43 return this.el.select('.tab-content', true).first();
46 getAutoCreate : function(){
50 cls: 'pull-left header',
58 cls: 'fa ' + this.icon
65 cls: 'nav-tabs-custom',
69 cls: 'nav nav-tabs pull-right',
76 cls: 'tab-content no-padding',
84 initEvents : function()
86 Roo.log('add add pane handler');
87 this.on('addpane', this.onAddPane, this);
90 setTitle : function(value)
92 this.el.select('.header', true).first().dom.innerHTML = value;
94 onAddPane : function(pane)
98 // tabs are rendere left to right..
99 var ctr = this.el.select('.nav-tabs', true).first();
102 var tab = ctr.createChild({
104 cls : 'active nav-tab',
117 tab.on('click', this.onTabClick.createDelegate(this, [pane], true));
120 onTabClick : function(ev,un,ob,pane)
123 this.el.select('.nav-tabs li.nav-tab', true).removeClass('active');
124 panel.tab.addClass('active');