From 8ae704a5a84437f1aa0aef1d6a8c3012c01d67c9 Mon Sep 17 00:00:00 2001 From: edward Date: Wed, 30 Mar 2016 13:19:54 +0800 Subject: [PATCH] Roo/bootstrap/Table.js --- Roo/bootstrap/Table.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/Table.js b/Roo/bootstrap/Table.js index ccef313813..da052fc6c3 100644 --- a/Roo/bootstrap/Table.js +++ b/Roo/bootstrap/Table.js @@ -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) } -- 2.39.2