10 * @class Roo.bootstrap.dash.TabBox
11 * @extends Roo.bootstrap.Component
12 * Bootstrap TabBox class
14 * @cfg {String} tab1_text
15 * @cfg {String} tab2_text
19 * @param {Object} config The config object
22 Roo.bootstrap.dash = Roo.bootstrap.dash || {};
23 Roo.bootstrap.dash.TabBox = function(config){
24 Roo.bootstrap.dash.TabBox.superclass.constructor.call(this, config);
30 * The img click event for the img.
31 * @param {Roo.EventObject} e
37 Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component, {
44 getAutoCreate : function(){
48 cls: 'nav-tabs-custom',
53 // cls: 'pull-left header',
54 // html: this.title ? this.title : 'Title',
58 cls: 'nav nav-tabs pull-right',
66 // data-toggle: 'tab',
67 html: this.tab1_text ? this.tab1_text : 'tab1'
77 // data-toggle: 'tab',
78 html: this.tab2_text ? this.tab2_text : 'tab2'
83 cls: 'pull-left header',
84 html: this.title ? this.title : 'Title',
96 initEvents: function() {
99 // this.el.on('click', this.onClick, this);
102 Roo.each(_this.el.select('li',true).elements, function(el){
104 el.on('click', _this.onClick, el);
108 onClick : function(e)
110 Roo.log('img onclick');
112 this.findParent('ul',false, true).select('li.active').removeClass('active');
113 this.addClass('active');
115 //this.el.select('li.active',true).first().removeClass('active');
117 // Roo.get(e.target).findParent('li',false, true).addClass('active');
119 //this.fireEvent('toggle', this, e);