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) {
35 cfg.cn[0].href = this.href;
39 cfg.cn[0].html = this.html;
56 if(cfg.html){cfg.html = ' ' + this.html};
60 cls: 'glyphicon glyphicon-' + this.glyphicon
65 cfg.cn[0].html = this.html || cfg.cn[0].html ;
69 cfg.cn[0].html += " <span class='caret'></span>";
70 //}else if (!this.href) {
72 // cfg.cn[0].cls='navbar-text';
75 cfg.cn[0].href=this.href||'#';
76 cfg.cn[0].html=this.html;
79 if (this.badge !== '') {
95 initEvents: function() {
96 // Roo.log('init events?');
97 // Roo.log(this.el.dom);
98 this.el.select('a',true).on('click',
100 this.fireEvent('click', this);