major doc changes
[roojs1] / Roo / bootstrap / dash / TabBox.js
index 62aa87d..7753f85 100644 (file)
@@ -9,10 +9,12 @@ Roo.bootstrap.dash = Roo.bootstrap.dash || {};
 /**
  * @class Roo.bootstrap.dash.TabBox
  * @extends Roo.bootstrap.Component
+ * @children Roo.bootstrap.dash.TabPane
  * Bootstrap TabBox class
  * @cfg {String} title Title of the TabBox
  * @cfg {String} icon Icon of the TabBox
  * @cfg {Boolean} showtabs (true|false) show the tabs default true
+ * @cfg {Boolean} tabScrollable (true|false) tab scrollable when mobile view default false
  * 
  * @constructor
  * Create a new TabBox
@@ -48,6 +50,7 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
     title : '',
     icon : false,
     showtabs : true,
+    tabScrollable : false,
     
     getChildContainer : function()
     {
@@ -70,31 +73,42 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
             });
         }
         
+        var h = {
+            tag: 'ul',
+            cls: 'nav nav-tabs pull-right',
+            cn: [
+                header
+            ]
+        };
+        
+        if(this.tabScrollable){
+            h = {
+                tag: 'div',
+                cls: 'tab-header',
+                cn: [
+                    {
+                        tag: 'ul',
+                        cls: 'nav nav-tabs pull-right',
+                        cn: [
+                            header
+                        ]
+                    }
+                ]
+            };
+        }
         
         var cfg = {
             tag: 'div',
             cls: 'nav-tabs-custom',
             cn: [
-                {
-                    tag: 'div',
-                    cls: 'tab-header',
-                    cn: [
-                        {
-                            tag: 'ul',
-                            cls: 'nav nav-tabs pull-right',
-                            cn: [
-                                header
-                            ]
-                        }
-                    ]
-                },
+                h,
                 {
                     tag: 'div',
                     cls: 'tab-content no-padding',
                     cn: []
                 }
             ]
-        }
+        };
 
         return  cfg;
     },