Roo/bootstrap/Table.js
authoredward <edward@roojs.com>
Wed, 30 Mar 2016 05:19:54 +0000 (13:19 +0800)
committeredward <edward@roojs.com>
Wed, 30 Mar 2016 05:19:54 +0000 (13:19 +0800)
Roo/bootstrap/Table.js

index ccef313..da052fc 100644 (file)
@@ -511,9 +511,20 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 c.cls = (typeof(c.cls) == 'undefined') ? config.cls : (c.cls + ' ' + config.cls);
             }
             
-            if(typeof(config.xs) != 'undefined'){
-                c.cls = (typeof(c.cls) == 'undefined') ? config.cls : (c.cls + ' ' + config.cls);
-            }
+            ['xs','sm','md','lg'].map(function(size){
+                
+                if(typeof(config[size]) == 'undefined'){
+                    return;
+                }
+                
+                if (!config[size]) { // 0 = hidden
+                    cfg.cls += ' hidden-' + size;
+                    return;
+                }
+                
+                cfg.cls += ' col-' + size + '-' + config[size];
+
+            });
             
             header.cn.push(c)
         }