451596aa4973a2f869c82fbf5bfdc613f41be556
[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         cfg = {
55             tag: 'li',
56             cls: '',
57             html: null,
58             cn : [{
59                 tag: 'a',
60                 href: '#',
61                 html: this.text ? this.text : 'tab'
62             }]
63         }
64           
65         
66         return cfg;
67     },
68     
69     
70 });
71
72  
73
74
75