From f5de5abd4e327d9173c723f5f48d3080aab32d3c Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 24 Jan 2019 15:09:49 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js --- roojs-bootstrap-debug.js | 10 ++++++++-- roojs-bootstrap.js | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 447e85df31..f08f314492 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -7183,12 +7183,18 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { return; } + + if (!config[size]) { // 0 = hidden - td.cls += ' hidden-' + size; + // BS 4 '0' is treated as hide that column and below. + td.cls += ' hidden-' + size + ' hidden' + size + 'down'; return; } - td.cls += ' col-' + size + '-' + config[size]; + td.cls += ' col-' + size + '-' + config[size] + ( + size == 'xs' ? (' col-' + config[size] ) : '' // bs4 col-{num} replaces col-xs + ); + }); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 8415b0e417..5c5b94e10c 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -290,8 +290,8 @@ i++){this.insertRow(this.store,B+i,false);return;}},refreshRow:function(A){var d for(var i=0,D=cm.getColumnCount();i tr',true).elements;if(typeof(C[A])=='undefined'){return; +}if(typeof(E.cls)!='undefined'){td.cls=(typeof(td.cls)=='undefined')?E.cls:(td.cls+' '+E.cls);}['xs','sm','md','lg'].map(function(I){if(typeof(E[I])=='undefined'){return;}if(!E[I]){td.cls+=' hidden-'+I+' hidden'+I+'down';return;}td.cls+=' col-'+I+'-'+E[I]+(I=='xs'?(' col-'+E[I]):''); +});B.cn.push(td);}B.cellObjects=C;return B;},onBeforeLoad:function(){},clear:function(){this.el.select('tbody',true).first().dom.innerHTML='';},setRowVisibility:function(A,B){var bt=this.mainBody.dom;var C=this.el.select('tbody > tr',true).elements;if(typeof(C[A])=='undefined'){return; }C[A].dom.style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel({grid:this});}return this.selModel;},renderCellObject:function(r){var A=this;r.cfg.parentId=(typeof(r.container)=='string')?r.container:r.container.id; var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={container:t.getChildContainer(),cfg:c};A.renderCellObject(B);})}},getRowIndex:function(A){var B=-1;Roo.each(this.el.select('tbody > tr',true).elements,function(el,C){if(el!=A){return; }B=C;});return B;},getGridEl:function(){return this.el;},autoSize:function(){var A=Roo.get(this.el.dom);var B=this.getGridEl().select('thead',true).first();var C=this.getGridEl().select('tbody',true).first();var D=this.getGridEl().select('tfoot',true).first(); -- 2.39.2