7 Roo.bootstrap.Navbar.Item = function(config){
8 Roo.bootstrap.Navbar.Item.superclass.constructor.call(this, config);
11 Roo.extend(Roo.bootstrap.Navbar.Item, Roo.bootstrap.Component, {
17 getAutoCreate : function(){
19 var cfg = Roo.apply({}, Roo.bootstrap.Navbar.Item.superclass.getAutoCreate.call(this));
32 if(cfg.html){cfg.html = ' ' + cfg.html};
36 cls: 'glyphicon glyphicon-' + this.glyphicon
41 cfg.cn[0].html = this.html || cfg.cn[0].html ;
45 cfg.cn[0].html += " <span class='caret'></span>";
46 //}else if (!this.href) {
48 // cfg.cn[0].cls='navbar-text';
51 cfg.cn[0].href=this.href||'#';
52 cfg.cn[0].html=this.html;
55 if (this.badge !== '') {
71 initEvents: function() {
72 // Roo.log('init events?');
73 // Roo.log(this.el.dom);
74 this.el.select('a',true).on('click',
76 this.fireEvent('click', this);