roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Thu, 24 Jan 2019 07:09:49 +0000 (15:09 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 24 Jan 2019 07:09:49 +0000 (15:09 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 447e85d..f08f314 100644 (file)
@@ -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
+                );
+                 
 
             });
             
index 8415b0e..5c5b94e 100644 (file)
@@ -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<D;i++){var E=cm.config[i];var F=cm.getRenderer(i);var G='';var id=false;if(typeof(F)!=='undefined'){G=F(d.data[cm.getDataIndex(i)],false,d);}if(typeof(G)==='object'){id=Roo.id();C.push({container:id,cfg:G})}var H={record:d,rowIndex:A,colIndex:i,rowClass:''}
 ;this.fireEvent('rowclass',this,H);var td={tag:'td',cls:H.rowClass+' x-col-'+i,style:'',html:(typeof(G)==='object')?'':G};if(id){td.id=id;}if(typeof(E.colspan)!='undefined'){td.colspan=E.colspan;}if(typeof(E.hidden)!='undefined'&&E.hidden){td.style+=' display:none;';
 }if(typeof(E.align)!='undefined'&&E.align.length){td.style+=' text-align:'+E.align+';';}if(typeof(E.valign)!='undefined'&&E.valign.length){td.style+=' vertical-align:'+E.valign+';';}if(typeof(E.width)!='undefined'){td.style+=' width:'+E.width+'px;';}if(typeof(E.cursor)!='undefined'){td.style+=' cursor:'+E.cursor+';';
-}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;return;}td.cls+=' col-'+I+'-'+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;
+}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();