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, {
19 getAutoCreate : function(){
21 var cfg = Roo.apply({}, Roo.bootstrap.Navbar.Item.superclass.getAutoCreate.call(this));
23 if (this.parent().parent().sidebar === true) {
42 if(cfg.html){cfg.html = ' ' + this.html};
46 cls: 'glyphicon glyphicon-' + this.glyphicon
51 cfg.cn[0].html = this.html || cfg.cn[0].html ;
55 cfg.cn[0].html += " <span class='caret'></span>";
56 //}else if (!this.href) {
58 // cfg.cn[0].cls='navbar-text';
61 cfg.cn[0].href=this.href||'#';
62 cfg.cn[0].html=this.html;
65 if (this.badge !== '') {
81 initEvents: function() {
82 // Roo.log('init events?');
83 // Roo.log(this.el.dom);
84 this.el.select('a',true).on('click',
86 this.fireEvent('click', this);