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;
43 cfg.cn[0].html = '<i class="icon-'+this.icon+'"></i>'+cfg.cn[0].html || this.html
60 if(cfg.html){cfg.html = ' ' + this.html};
64 cls: 'glyphicon glyphicon-' + this.glyphicon
69 cfg.cn[0].html = this.html || cfg.cn[0].html ;
73 cfg.cn[0].html += " <span class='caret'></span>";
74 //}else if (!this.href) {
76 // cfg.cn[0].cls='navbar-text';
79 cfg.cn[0].href=this.href||'#';
80 cfg.cn[0].html=this.html;
83 if (this.badge !== '') {
99 initEvents: function() {
100 // Roo.log('init events?');
101 // Roo.log(this.el.dom);
102 this.el.select('a',true).on('click',
104 this.fireEvent('click', this);