9 * @class Roo.bootstrap.nav.Simplebar
10 * @extends Roo.bootstrap.nav.Bar
11 * @children Roo.bootstrap.nav.Group Roo.bootstrap.Container Roo.bootstrap.Form Roo.bootstrap.Row Roo.bootstrap.Column Roo.bootstrap.Link
12 * Bootstrap Sidebar class
14 * @cfg {Boolean} inverse is inverted color
16 * @cfg {String} type (nav | pills | tabs)
17 * @cfg {Boolean} arrangement stacked | justified
18 * @cfg {String} align (left | right) alignment
20 * @cfg {Boolean} main (true|false) main nav bar? default false
21 * @cfg {Boolean} loadMask (true|false) loadMask on the bar
23 * @cfg {String} tag (header|footer|nav|div) default is nav
25 * @cfg {String} weight (light|primary|secondary|success|danger|warning|info|dark|white) default is light.
29 * Create a new Sidebar
30 * @param {Object} config The config object
34 Roo.bootstrap.nav.Simplebar = function(config){
35 Roo.bootstrap.nav.Simplebar.superclass.constructor.call(this, config);
38 Roo.extend(Roo.bootstrap.nav.Simplebar, Roo.bootstrap.nav.Bar, {
54 getAutoCreate : function(){
58 tag : this.tag || 'div',
59 cls : 'navbar roo-navbar-simple' //navbar-expand-lg ??
61 if (['light','white'].indexOf(this.weight) > -1) {
62 cfg.cls += ['light','white'].indexOf(this.weight) > -1 ? ' navbar-light' : ' navbar-dark';
64 cfg.cls += ' bg-' + this.weight;
67 cfg.cls += ' navbar-inverse';
71 // i'm not actually sure these are really used - normally we add a navGroup to a navbar
73 if (Roo.bootstrap.version == 4 && this.xtype == 'NavSimplebar') {
82 cls: 'nav nav-' + this.xtype,
88 this.type = this.type || 'nav';
89 if (['tabs','pills'].indexOf(this.type) != -1) {
90 cfg.cn[0].cls += ' nav-' + this.type
94 if (this.type!=='nav') {
95 Roo.log('nav type must be nav/tabs/pills')
97 cfg.cn[0].cls += ' navbar-nav'
103 if (['stacked','justified'].indexOf(this.arrangement) != -1) {
104 cfg.cn[0].cls += ' nav-' + this.arrangement;
108 if (this.align === 'right') {
109 cfg.cn[0].cls += ' navbar-right';