From 392747ff0581018c9a870bed5c6fab90e36846e4 Mon Sep 17 00:00:00 2001 From: leon Date: Wed, 30 Nov 2022 16:01:42 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js --- roojs-bootstrap-debug.js | 4 ++-- roojs-bootstrap.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index b625840941..c08321789e 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -10050,8 +10050,6 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { var value = cm.config[i].summaryFooter; - Roo.log('value [' + i + '] : ' + value); - var td = { tag: 'td', cls : ' x-fcol-' + i, @@ -10063,6 +10061,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { } + tfoot.dom.innerHTML = ''; + tfoot.createChild(tr); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index b11c175120..b58e073033 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -427,15 +427,15 @@ var c={tag:'th',cls:'x-hcol-'+i,style:'',html:cm.getColumnHeader(i)};var D=cm.ge ]}]};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 tr',true).elements; -if(typeof(D[B])!='undefined'){bt.removeChild(D[B].dom);}if(C!==true){this.fireEvent("rowremoved",this,B,A);}},onAdd:function(ds,A,B){var bt=this.bodyEl.dom;for(var i=0;i=this.ds.getCount()){return null;}B=(B!==undefined?B:0);var cm=this.cm;while(cm.isHidden(B)){B++;}var el=this.getCellDom(A,B);if(!el){return null;}var c=this.bodyEl.dom;var D=parseInt(el.offsetTop,10); -var E=parseInt(el.offsetLeft,10);var F=D+el.offsetHeight;var G=E+el.offsetWidth;var ch=0;var H=parseInt(c.scrollTop,10);var I=parseInt(c.scrollLeft,10);var J=H+ch;var K=I+c.clientWidth;if(DJ){c.scrollTop=F-ch;}if(C!==false){if(EK){c.scrollLeft=G-c.clientWidth;}}return el;},insertRow:function(dm,A,B){if(!B){this.fireEvent("beforerowsinserted",this,A);}var C=this.renderRow(this.cm,this.store,A);var e=this.bodyEl.createChild(C,this.getRowDom(A));var D=this;if(C.cellObjects.length){Roo.each(C.cellObjects,function(r){D.renderCellObject(r); +var D=this.ds.getTotalCount();if(this.footer.pageSize tr',true).elements;if(typeof(D[B])!='undefined'){bt.removeChild(D[B].dom); +}if(C!==true){this.fireEvent("rowremoved",this,B,A);}},onAdd:function(ds,A,B){var bt=this.bodyEl.dom;for(var i=0;i=this.ds.getCount()){return null;}B=(B!==undefined?B:0);var cm=this.cm;while(cm.isHidden(B)){B++;}var el=this.getCellDom(A,B);if(!el){return null;}var c=this.bodyEl.dom;var D=parseInt(el.offsetTop,10);var E=parseInt(el.offsetLeft,10);var F=D+el.offsetHeight; +var G=E+el.offsetWidth;var ch=0;var H=parseInt(c.scrollTop,10);var I=parseInt(c.scrollLeft,10);var J=H+ch;var K=I+c.clientWidth;if(DJ){c.scrollTop=F-ch;}if(C!==false){if(EK){c.scrollLeft=G-c.clientWidth; +}}return el;},insertRow:function(dm,A,B){if(!B){this.fireEvent("beforerowsinserted",this,A);}var C=this.renderRow(this.cm,this.store,A);var e=this.bodyEl.createChild(C,this.getRowDom(A));var D=this;if(C.cellObjects.length){Roo.each(C.cellObjects,function(r){D.renderCellObject(r); })}if(!B){this.fireEvent("rowsinserted",this,A);}},getRowDom:function(A){var B=this.el.select('tbody > tr',true).elements;return (typeof(B[A])=='undefined')?false:B[A];},getCellDom:function(A,B){var C=this.getRowDom(A);if(C===false){return false;}var D=C.select('td',true).elements; return (typeof(D[B])=='undefined')?false:D[B];},renderRow:function(cm,ds,A){var d=ds.getAt(A);var B={tag:'tr',cls:'x-row-'+A,cn:[]};var C=[];for(var i=0,D=cm.getColumnCount();i