Roo/bootstrap/MenuItem.js
[roojs1] / Roo / bootstrap / MenuItem.js
1 /*
2  * - LGPL
3  *
4  * row
5  * 
6  */
7
8
9 /**
10  * @class Roo.bootstrap.MenuItem
11  * @extends Roo.bootstrap.Component
12  * Bootstrap MenuItem class 
13  * 
14  * @constructor
15  * Create a new MenuItem
16  * @param {Object} config The config object
17  */
18
19
20 Roo.bootstrap.MenuItem = function(config){
21     Roo.bootstrap.MenuItem.superclass.constructor.call(this, config);
22 };
23
24 Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component,  {
25       
26         href : false,
27     html : false,
28     
29     
30     
31     getAutoCreate : function(){
32         var cfg= {
33             // cls: '',
34              tag : 'li',
35              cn : [
36              {
37                  tag : 'a',
38                  href : '#',
39                  html : 'Link'
40              }
41              ]
42          };
43             
44         cfg.cn[0].href = this.href || cfg.cn[0].href ;
45         cfg.cn[0].html = this.html || cfg.cn[0].html ;
46         return cfg;
47     }
48    
49 });
50
51  
52
53