0a21b03aa0a618b9d13895235f98da1aa7f1407c
[roojs1] / Roo / bootstrap / dash / TabItem.js
1 /*
2  * - LGPL
3  *
4  * nav group
5  * 
6  */
7
8 /**
9  * @class Roo.bootstrap.NavGroup
10  * @extends Roo.bootstrap.Component
11  * Bootstrap NavGroup class
12  * @cfg {String} align left | right
13  * @cfg {Boolean} inverse false | true
14  * @cfg {String} type (nav|pills|tab) default nav
15  * @cfg {String} navId - reference Id for navbar.
16
17  * 
18  * @constructor
19  * Create a new nav group
20  * @param {Object} config The config object
21  */
22 Roo.bootstrap.dash = Roo.bootstrap.dash || {};
23 Roo.bootstrap.dash.TabItem = function(config){
24     Roo.bootstrap.dash.TabItem.superclass.constructor.call(this, config);
25     this.tabItems = [];
26     //Roo.bootstrap.NavGroup.register(this);
27      this.addEvents({
28         /**
29              * @event changed
30              * Fires when the active item changes
31              * @param {Roo.bootstrap.NavGroup} this
32              * @param {Roo.bootstrap.Navbar.Item} item The item selected
33              * @param {Roo.bootstrap.Navbar.Item} item The previously selected item 
34          */
35         'changed': true
36      });
37     
38 };
39
40 Roo.extend(Roo.bootstrap.dash.TabItem, Roo.bootstrap.Component,  {
41     
42     text: '',
43     // inverse: false,
44     // form: false,
45     // type: 'nav',
46     // navId : '',
47     // private
48     
49   
50     getAutoCreate : function()
51     {
52         
53         Roo.log('TabItem:');
54         
55         cfg = {
56             tag: 'li',
57             cls: '',
58             html: null,
59             cn : [{
60                 tag: 'a',
61                 href: '#',
62                 html: this.text ? this.text : 'tab'
63             }]
64         }
65           
66         
67         return cfg;
68     },
69     
70     
71 });
72
73  
74
75
76