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) {
36 cfg.cn[0].cls += ' dropdown-toggle';
41 cfg.cn[0].href = this.href;
45 cfg.cn[0].html = this.html;
49 cfg.cn[0].html = '<i class="glyphicon glyphicon-'+this.glyphicon+'"></i><span>' + cfg.cn[0].html || this.html + '</span>'
66 if(cfg.html){cfg.html = ' ' + this.html};
70 cls: 'glyphicon glyphicon-' + this.glyphicon
75 cfg.cn[0].html = this.html || cfg.cn[0].html ;
79 cfg.cn[0].html += " <span class='caret'></span>";
80 //}else if (!this.href) {
82 // cfg.cn[0].cls='navbar-text';
85 cfg.cn[0].href=this.href||'#';
86 cfg.cn[0].html=this.html;
89 if (this.badge !== '') {
105 initEvents: function() {
106 // Roo.log('init events?');
107 // Roo.log(this.el.dom);
108 this.el.select('a',true).on('click',
110 this.fireEvent('click', this);