}
// html..
a.cn.push(span);
-
+ // then badge..
if (this.badge !== '') {
a.cn.push({ tag: 'span', cls : 'badge pull-right ' + (this.badgecls || ''), html: this.badge });
}
-
+ // fi
if (this.menu) {
- right = right || { tag : 'i', cls : '' };
- a.cls += ' dropdown-toggle treeview';
- right.cls += 'glyphicon glyphicon-chevron-down';
+ a.push({ tag : 'i', cls : 'glyphicon glyphicon-chevron-down'});
+ a.cls += 'dropdown-toggle treeview' ;
+
}
if (this.active) {
cfg.cls += ' active';
}
- var right = false;
- // fixme - this should handle glyphicon or ico
+
+ // left icon..
if (this.glyphicon || this.icon) {
var c = this.glyphicon ? ('glyphicon glyphicon-'+this.glyphicon) : this.icon;
- right = { tag : 'i', cls : c };
- a.cn.push(right) ;
+ a.cn.push({ tag : 'i', cls : c }) ;
}
+ // html..
a.cn.push(span);
-
+ // then badge..
if (this.badge !== '') {
a.cn.push({ tag: 'span', cls : 'badge pull-right ' + (this.badgecls || ''), html: this.badge });
}
-
+ // fi
if (this.menu) {
- right = right || { tag : 'i', cls : '' };
- a.cls += ' dropdown-toggle treeview';
- right.cls += 'glyphicon glyphicon-chevron-down';
+ a.push({ tag : 'i', cls : 'glyphicon glyphicon-chevron-down'});
+ a.cls += 'dropdown-toggle treeview' ;
+
}
//Roo/bootstrap/NavItem.js
Roo.bootstrap.NavItem=function(A){Roo.bootstrap.NavItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true});};Roo.extend(Roo.bootstrap.NavItem,Roo.bootstrap.Component,{href:false,html:'',badge:'',icon:false,glyphicon:false,active:false,preventDefault:false,tabId:false,getAutoCreate:function(){var A={tag:'li',cls:'nav-item',cn:[{tag:'a',href:this.href||"#",html:this.html||''}]};if(this.active){A.cls=typeof(A.cls)=='undefined'?'active':A.cls+' active';}if(this.glyphicon||this.icon){if(this.icon){A.cn[0].html='<i class="'+this.icon+'"></i><span>'+A.cn[0].html+'</span>'}else {A.cn[0].html='<span class="glyphicon glyphicon-'+this.glyphicon+'"></span>'+A.cn[0].html;}}if(this.menu){A.cn[0].html+=" <span class='caret'></span>";}if(this.badge!==''){A.cn[0].html+=' <span class="badge">'+this.badge+'</span>';}return A;},initEvents:function(){this.el.select('a',true).on('click',this.onClick,this);this.parent().register(this);},onClick:function(e){if(this.preventDefault){e.preventDefault();}if(this.fireEvent('click',this,e)===false){return;};if(['tabs','pills'].indexOf(this.parent().type)!==-1){if(typeof(this.parent().setActiveItem)!=='undefined'){this.parent().setActiveItem(this);}}},isActive:function(){return this.active},setActive:function(A,B){this.active=A;if(!A){this.el.removeClass('active');}else if(!this.el.hasClass('active')){this.el.addClass('active');}if(B){this.fireEvent('changed',this,A);}}});
//Roo/bootstrap/NavSidebarItem.js
-Roo.bootstrap.NavSidebarItem=function(A){Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true});};Roo.extend(Roo.bootstrap.NavSidebarItem,Roo.bootstrap.NavItem,{getAutoCreate:function(){var a={tag:'a',href:this.href||'#',cls:'',html:'',cn:[]};var A={tag:'li',cls:'',cn:[a]};var span={tag:'span',html:this.html||''};if(this.active){A.cls+=' active';}var right=false;if(this.glyphicon||this.icon){var c=this.glyphicon?('glyphicon glyphicon-'+this.glyphicon):this.icon;right={tag:'i',cls:c};a.cn.push(right);}
-a.cn.push(span);if(this.badge!==''){a.cn.push({tag:'span',cls:'badge pull-right '+(this.badgecls||''),html:this.badge});}if(this.menu){right=right||{tag:'i',cls:''};a.cls+=' dropdown-toggle treeview';right.cls+='glyphicon glyphicon-chevron-down';}return A;}});
+Roo.bootstrap.NavSidebarItem=function(A){Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true});};Roo.extend(Roo.bootstrap.NavSidebarItem,Roo.bootstrap.NavItem,{getAutoCreate:function(){var a={tag:'a',href:this.href||'#',cls:'',html:'',cn:[]};var A={tag:'li',cls:'',cn:[a]};var span={tag:'span',html:this.html||''};if(this.active){A.cls+=' active';}if(this.glyphicon||this.icon){var c=this.glyphicon?('glyphicon glyphicon-'+this.glyphicon):this.icon;a.cn.push({tag:'i',cls:c});}
+a.cn.push(span);if(this.badge!==''){a.cn.push({tag:'span',cls:'badge pull-right '+(this.badgecls||''),html:this.badge});}if(this.menu){a.push({tag:'i',cls:'glyphicon glyphicon-chevron-down'});a.cls+='dropdown-toggle treeview';}return A;}});
//Roo/bootstrap/Row.js
Roo.bootstrap.Row=function(A){Roo.bootstrap.Row.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Row,Roo.bootstrap.Component,{getAutoCreate:function(){return {cls:'row clearfix'};}});
//Roo/bootstrap/Element.js