Roo/bootstrap/Table.js
authorleon <leon@roojs.com>
Wed, 30 Nov 2022 07:37:54 +0000 (15:37 +0800)
committerleon <leon@roojs.com>
Wed, 30 Nov 2022 07:37:54 +0000 (15:37 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/Table.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 2c7dabd..38f11ff 100644 (file)
@@ -915,6 +915,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             tag: 'tfoot',
             cn : []
         };
+
+        var cm = this.cm;
         
         for(var i = 0, len = cm.getColumnCount(); i < len; i++){
             
index 20066ee..778c92a 100644 (file)
@@ -9992,6 +9992,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             tag: 'tfoot',
             cn : []
         };
+
+        var cm = this.cm;
         
         for(var i = 0, len = cm.getColumnCount(); i < len; i++){
             
index 89d3741..1f7bebb 100644 (file)
@@ -424,8 +424,8 @@ var c={tag:'th',cls:'x-hcol-'+i,style:'',html:cm.getColumnHeader(i)};var D=cm.ge
 }if(hh.length){c.html=hh;}if(typeof(C.tooltip)!='undefined'){c.tooltip=C.tooltip;}if(typeof(C.colspan)!='undefined'){c.colspan=C.colspan;}if(typeof(C.dataIndex)!='undefined'){c.sort=C.dataIndex;}if(typeof(C.align)!='undefined'&&C.align.length){c.style+=' text-align:'+C.align+';';
 }if(typeof(C.cls)!='undefined'){c.cls=(typeof(c.cls)=='undefined')?C.cls:(c.cls+' '+C.cls);}if(this.responsive){['xs','sm','md','lg'].map(function(E){if(typeof(C[E])=='undefined'){return;}if(!C[E]){c.cls+=' hidden-'+E+' hidden'+E+'-down';return;}c.cls+=' col-'+E+'-'+C[E]+(E=='xs'?(' col-'+C[E]):'');
 });}c.html+=' <span class="x-grid-split x-grid-split-'+i+'"></span>';A.cn.push(c)}return A;},renderBody:function(){var A={tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;},renderFooter:function(){var A={tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}
-]}]};return A;},renderSummaryFooter:function(){var A={tag:'tfoot',cn:[]};for(var i=0,B=cm.getColumnCount();i<B;i++){var c={tag:'td',cls:'x-fcol-'+i,style:'',html:''};A.cn.push(c)}return A;},onLoad:function(){this.clear();var A=this;var cm=this.cm;var ds=this.store;
-Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.select('i',true).removeClass(['fa-arrow-up','fa-arrow-down']);if(A.store.sortInfo){if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='ASC'){e.select('i',true).addClass(['fa-arrow-up']);
+]}]};return A;},renderSummaryFooter:function(){var A={tag:'tfoot',cn:[]};var cm=this.cm;for(var i=0,B=cm.getColumnCount();i<B;i++){var c={tag:'td',cls:'x-fcol-'+i,style:'',html:''};A.cn.push(c)}return A;},onLoad:function(){this.clear();var A=this;var cm=this.cm;
+var ds=this.store;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.select('i',true).removeClass(['fa-arrow-up','fa-arrow-down']);if(A.store.sortInfo){if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='ASC'){e.select('i',true).addClass(['fa-arrow-up']);
 }if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.select('i',true).addClass(['fa-arrow-down']);}}});var B=this.bodyEl;if(ds.getCount()>0){ds.data.each(function(d,G){var H=this.renderRow(cm,ds,G);
 B.createChild(H);var I=this;if(H.cellObjects.length){Roo.each(H.cellObjects,function(r){I.renderCellObject(r);})}},this);}else if(this.empty_results.length){this.el.mask(this.empty_results,'no-spinner');}var C=this.el.select('tfoot',true).first();if(this.footerShow&&this.auto_hide_footer&&this.mainFoot){this.mainFoot.setVisibilityMode(Roo.Element.DISPLAY).hide();
 var D=this.ds.getTotalCount();if(this.footer.pageSize<D){this.mainFoot.show();}}if(!this.footerShow&&this.summaryFooterShow){for(var i=0,E=cm.getColumnCount();i<E;i++){var F=cm.config[i].summaryFooter;Roo.log('value ['+i+'] : '+F);}}Roo.each(this.el.select('tbody td',true).elements,function(e){e.on('mouseover',A.onMouseover,A);