Roo/bootstrap/dash/TabPane.js
[roojs1] / Roo / bootstrap / dash / TabPane.js
1 /*
2  * - LGPL
3  *
4  * Tab pane
5  * 
6  */
7 Roo.bootstrap.dash = Roo.bootstrap.dash || {};
8 /**
9  * @class Roo.bootstrap.TabPane
10  * @extends Roo.bootstrap.Component
11  * Bootstrap TabPane class
12  * @cfg {Boolean} active (false | true) Default false
13  * @cfg {String} title title of panel
14  * 
15  * @constructor
16  * Create a new TabPane
17  * @param {Object} config The config object
18  */
19
20 Roo.bootstrap.dash.TabPane = function(config){
21     Roo.bootstrap.dash.TabPane.superclass.constructor.call(this, config);
22     
23 };
24
25 Roo.extend(Roo.bootstrap.dash.TabPane, Roo.bootstrap.Component,  {
26     
27     active : false,
28     title : '',
29     
30 //    
31 //    getBox : function()
32 //    {
33 //        return this.el.findParent('.nav-tabs-custom', false, true);
34 //    },
35     
36     getAutoCreate : function() 
37     {
38         var cfg = {
39             tag: 'div',
40             cls: 'tab-pane'
41         }
42         
43         if(this.active){
44             cfg.cls += ' active';
45         }
46         
47         return cfg;
48     },
49     initEvents  : function()
50     {
51         var p= this.parent().fireEvent('addpane', this)
52     }
53     
54     
55     
56 });
57
58  
59
60
61