Partial Fix #5681 - fix bootstrap4 detection
[roojs1] / Roo / bootstrap / NavSimplebar.js
index 3459857..808c655 100644 (file)
@@ -55,25 +55,37 @@ Roo.extend(Roo.bootstrap.NavSimplebar, Roo.bootstrap.Navbar,  {
         
         var cfg = {
             tag : this.tag || 'div',
-            cls : 'navbar navbar-expand-lg'
+            cls : 'navbar roo-navbar-simple' //navbar-expand-lg ??
         };
        if (['light','white'].indexOf(this.weight) > -1) {
            cfg.cls += ['light','white'].indexOf(this.weight) > -1 ? ' navbar-light' : ' navbar-dark';
        }
        cfg.cls += ' bg-' + this.weight;
        
-         
+       if (this.inverse) {
+            cfg.cls += ' navbar-inverse';
+            
+        }
+       
+       // i'm not actually sure these are really used - normally we add a navGroup to a navbar
+       
+       if (Roo.bootstrap.version == 4 && this.xtype == 'NavSimplebar') {
+           return cfg;
+       }
+       
+       
+    
        
         cfg.cn = [
             {
-                cls: 'nav',
+                cls: 'nav nav-' + this.xtype,
                 tag : 'ul'
             }
         ];
         
          
         this.type = this.type || 'nav';
-        if (['tabs','pills'].indexOf(this.type)!==-1) {
+        if (['tabs','pills'].indexOf(this.type) != -1) {
             cfg.cn[0].cls += ' nav-' + this.type
         
         
@@ -87,7 +99,7 @@ Roo.extend(Roo.bootstrap.NavSimplebar, Roo.bootstrap.Navbar,  {
         
         
         
-        if (['stacked','justified'].indexOf(this.arrangement)!==-1) {
+        if (['stacked','justified'].indexOf(this.arrangement) != -1) {
             cfg.cn[0].cls += ' nav-' + this.arrangement;
         }
         
@@ -96,10 +108,7 @@ Roo.extend(Roo.bootstrap.NavSimplebar, Roo.bootstrap.Navbar,  {
             cfg.cn[0].cls += ' navbar-right';
         }
         
-        if (this.inverse) {
-            cfg.cls += ' navbar-inverse';
-            
-        }
+        
         
         
         return cfg;