13 * @class Roo.bootstrap.NavSidebarItem
14 * @extends Roo.bootstrap.Component
15 * Bootstrap Navbar.NavSidebarItem class
17 * Create a new Navbar Button
18 * @param {Object} config The config object
20 Roo.bootstrap.NavSidebarItem = function(config){
21 Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this, config);
26 * The raw click event for the entire grid.
27 * @param {Roo.EventObject} e
32 * Fires when the active item active state changes
33 * @param {Roo.bootstrap.Navbar.Item} this
34 * @param {boolean} state the new state
42 Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem, {
45 getAutoCreate : function(){
61 cfg.cn[0].html = this.html;
65 this.cls += ' active';
72 cfg.cn[0].href = this.href;
75 if (this.badge !== '') {
76 cfg.cn[0].html += ' <span class="badge">' + this.badge + '</span>';
80 cfg.cn[0].cls += ' dropdown-toggle treeview';
81 cfg.cn[0].html += '<span class="glyphicon glyphicon-chevron-down"></span>';
84 // fixme - this should handle glyphicon or ico
85 if (this.glyphicon || this.icon) {
86 var c = this.glyphicon ? ('glyphicon glyphicon-'+this.glyphicon) : this.icon;
87 cfg.cn[0].html = '<i class="' +c+'"></i><span>' + cfg.cn[0].html + '</span>'