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: 'nav nav-tabs pull-right',
61 // data-toggle: 'tab',
62 html: this.tab1_text ? this.tab1_text : 'tab1'
72 // data-toggle: 'tab',
73 html: this.tab2_text ? this.tab2_text : 'tab2'
78 // cls: 'pull-left header',
79 // html: this.title ? this.title : 'Title',
82 // cls: 'fa fa-inbox',
91 initEvents: function() {
94 // this.el.on('click', this.onClick, this);
97 Roo.each(_this.el.select('li',true).elements, function(el){
99 el.on('click', _this.onClick, el);
103 onClick : function(e)
105 Roo.log('img onclick');
107 this.findParent('ul',false, true).select('li.active').removeClass('active');
108 this.addClass('active');
110 //this.el.select('li.active',true).first().removeClass('active');
112 // Roo.get(e.target).findParent('li',false, true).addClass('active');
114 //this.fireEvent('toggle', this, e);