roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Mon, 26 Jul 2021 06:12:14 +0000 (14:12 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 26 Jul 2021 06:12:14 +0000 (14:12 +0800)
roojs-bootstrap-debug.js
Roo/bootstrap/Table.js

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

index dbeebfd..68e1ef4 100644 (file)
@@ -437,6 +437,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             var w = cm.getColumnWidth(i, false);
             if(!cm.isHidden(i)){
                 cols.push( { rel : false, abs : 0 });
+                continue;
             }
             if (w !== false) {
                 cols.push( { rel : false, abs : w });
index b65af7c..918288a 100644 (file)
@@ -9075,7 +9075,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         for(var i = 0, len = cm.getColumnCount(); i < len; i++) {
             var w = cm.getColumnWidth(i, false);
             if(!cm.isHidden(i)){
-                w = 0;
+                cols.push( { rel : false, abs : 0 });
+                continue;
             }
             if (w !== false) {
                 cols.push( { rel : false, abs : w });
index aac07ab..d498872 100644 (file)
@@ -374,9 +374,9 @@ if(this.footer){this.footer.parentId=this.id;this.footer.onRender(this.el.select
 );}this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);this.store.on('update',this.onUpdate,this);this.store.on('add',this.onAdd,this);this.store.on("clear",this.clear,this);this.el.on("contextmenu",this.onContextMenu,this);
 this.cm.on("headerchange",this.onHeaderChange,this);this.cm.on("hiddenchange",this.onHiddenChange,this,arguments);this.bodyEl.on("click",this.onClick,this);this.bodyEl.on("dblclick",this.onDblClick,this);this.bodyEl.on('scroll',this.onBodyScroll,this);this.relayEvents(this.bodyEl,["mousedown","mouseup","mouseover","mouseout","keypress"]);
 this.resizeProxy=Roo.get(document.body).createChild({cls:"x-grid-resize-proxy",html:'&#160;'});if(this.headEl&&this.enableColumnResize!==false&&Roo.grid.SplitDragZone){new Roo.grid.SplitDragZone(this,this.headEl.dom,false);}this.initCSS();},getView:function(){return this;
-},initCSS:function(){var cm=this.cm,A=[];this.CSS.removeStyleSheet(this.id+'-cssrules');var sz=Roo.getGridSize();var B=0;var C=-1;var D=[];var E=0;for(var i=0,F=cm.getColumnCount();i<F;i++){var w=cm.getColumnWidth(i,false);if(!cm.isHidden(i)){w=0;}if(w!==false){D.push({rel:false,abs:w}
-);E+=w;continue;}var w=cm.getColumnWidth(i,sz);if(w>0){C=i}B+=w;D.push({rel:w,abs:false});}var G=this.bodyEl.dom.clientWidth-E;var H=Math.floor(G/B);var I=G-(H*B);var J,K,L=0;for(var i=0,F=cm.getColumnCount();i<F;i++){var J='display:none;';var M='';var K='width:0px;';
-if(!cm.isHidden(i)){J='';var w=D[i].rel==false?D[i].abs:(D[i].rel*H);if(w===0){J='display:none;';}if(i==C){w+=I;}L+=w;M="left:"+L+"px;";K="width:"+w+"px;";}A.push('#',this.id,' .x-col-',i," {\n",cm.config[i].css,K,J,"\n}\n",'#',this.id,' .x-hcol-',i," {\n",K,J,"}\n",'#',this.id,' .x-grid-split-',i," {\n",M,"}\n");
+},initCSS:function(){var cm=this.cm,A=[];this.CSS.removeStyleSheet(this.id+'-cssrules');var sz=Roo.getGridSize();var B=0;var C=-1;var D=[];var E=0;for(var i=0,F=cm.getColumnCount();i<F;i++){var w=cm.getColumnWidth(i,false);if(!cm.isHidden(i)){D.push({rel:false,abs:0}
+);continue;}if(w!==false){D.push({rel:false,abs:w});E+=w;continue;}var w=cm.getColumnWidth(i,sz);if(w>0){C=i}B+=w;D.push({rel:w,abs:false});}var G=this.bodyEl.dom.clientWidth-E;var H=Math.floor(G/B);var I=G-(H*B);var J,K,L=0;for(var i=0,F=cm.getColumnCount();
+i<F;i++){var J='display:none;';var M='';var K='width:0px;';if(!cm.isHidden(i)){J='';var w=D[i].rel==false?D[i].abs:(D[i].rel*H);if(w===0){J='display:none;';}if(i==C){w+=I;}L+=w;M="left:"+L+"px;";K="width:"+w+"px;";}A.push('#',this.id,' .x-col-',i," {\n",cm.config[i].css,K,J,"\n}\n",'#',this.id,' .x-hcol-',i," {\n",K,J,"}\n",'#',this.id,' .x-grid-split-',i," {\n",M,"}\n");
 }Roo.log(A.join(''));this.CSS.createStyleSheet(A.join(''),this.id+'-cssrules');},onContextMenu:function(e,t){this.processEvent("contextmenu",e);},processEvent:function(A,e){if(A!='touchstart'){this.fireEvent(A,e);}var t=e.getTarget();var B=Roo.get(t);if(!B){return;
 }if(B.findParent('tfoot',false,true)){return;}if(B.findParent('thead',false,true)){if(e.getTarget().nodeName.toLowerCase()!='th'){B=Roo.get(t).findParent('th',false,true);if(!B){Roo.log("failed to find th in thead?");Roo.log(e.getTarget());return;}}var C=B.dom.cellIndex;
 var D=A=='touchstart'?'click':A;this.fireEvent("header"+D,this,C,e);return;}if(e.getTarget().nodeName.toLowerCase()!='td'){B=Roo.get(t).findParent('td',false,true);if(!B){Roo.log("failed to find th in tbody?");Roo.log(e.getTarget());return;}}var E=B.findParent('tr',false,true);