roojs-ui.js
authoredward <edward@roojs.com>
Mon, 18 Jul 2016 05:01:37 +0000 (13:01 +0800)
committeredward <edward@roojs.com>
Mon, 18 Jul 2016 05:01:37 +0000 (13:01 +0800)
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 9150069..1344072 100644 (file)
@@ -2318,11 +2318,11 @@ this.updateSplitters();this.layout();this.grid.fireEvent("columnresize",i,w);},s
 B=Math.min(B||E,E);for(var i=A;i<=B;i++){var m=C[i],l=D[i];var h=Math.max(m.offsetHeight,l.offsetHeight);m.style.height=l.style.height=h+"px";}}},layout:function(A,B){var g=this.grid;var C=g.autoHeight;var D=16;var c=g.getGridEl(),cm=this.cm,E=g.autoExpandColumn,gv=this;
 if(!c.dom.offsetWidth){if(A){this.lockedWrap.show();this.mainWrap.show();}return;}var F=this.cm.isLocked(0);var G=this.headerPanel.getHeight();var H=this.footerPanel.getHeight();if(C){var ch=this.getBodyTable().offsetHeight+G+H+this.mainHd.getHeight();var I=ch+c.getBorderWidth("tb");
 if(g.maxHeight){I=Math.min(g.maxHeight,I);}c.setHeight(I);}if(g.autoWidth){c.setWidth(cm.getTotalWidth()+c.getBorderWidth('lr'));}var s=this.scroller;var J=c.getSize(true);this.el.setSize(J.width,J.height);this.headerPanel.setWidth(J.width);this.footerPanel.setWidth(J.width);
-var K=this.mainHd.getHeight();var vw=J.width;var vh=J.height-(G+H);s.setSize(vw,vh);var bt=this.getBodyTable();var L=F?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;var M=bt.offsetHeight;var N=L+bt.offsetWidth;var O=false,P=false;
-this.scrollSizer.setSize(N,M+K);var lw=this.lockedWrap,mw=this.mainWrap;var lb=this.lockedBody,mb=this.mainBody;setTimeout(function(){var t=s.dom.offsetTop;var w=s.dom.clientWidth,h=s.dom.clientHeight;lw.setTop(t);lw.setSize(L,h);mw.setLeftTop(L,t);mw.setSize(w-L,h);
-lb.setHeight(h-K);mb.setHeight(h-K);if(B!==true&&!gv.userResized&&E){var ci=cm.getIndexById(E);if(ci<0){ci=cm.findColumnIndex(E);}ci=Math.max(0,ci);var Q=cm.getColumnId(ci);var tw=cm.getTotalWidth(false);var R=cm.getColumnWidth(ci);var cw=Math.min(Math.max(((w-tw)+R-2)-(w<=s.dom.offsetWidth?0:18),g.autoExpandMin),g.autoExpandMax);
-if(R!=cw){cm.setColumnWidth(ci,cw,true);gv.css.updateRule(gv.colSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");gv.css.updateRule(gv.hdSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");gv.updateSplitters();gv.layout(false,true);}}if(A){lw.show();
-mw.show();}},10);},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return;}this.layout();},appendFooter:function(A){return null;},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns",columnsWiderText:"Wider",columnsNarrowText:"Thinner"}
+var K=this.mainHd.getHeight();var vw=J.width;var vh=J.height-(G+H);s.setSize(vw,vh);var bt=this.getBodyTable();if(cm.getLockedCount()==cm.config.length){bt=this.getLockedTable();}var L=F?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;
+var M=bt.offsetHeight;var N=L+bt.offsetWidth;var O=false,P=false;this.scrollSizer.setSize(N,M+K);var lw=this.lockedWrap,mw=this.mainWrap;var lb=this.lockedBody,mb=this.mainBody;setTimeout(function(){var t=s.dom.offsetTop;var w=s.dom.clientWidth,h=s.dom.clientHeight;
+lw.setTop(t);lw.setSize(L,h);mw.setLeftTop(L,t);mw.setSize(w-L,h);lb.setHeight(h-K);mb.setHeight(h-K);if(B!==true&&!gv.userResized&&E){var ci=cm.getIndexById(E);if(ci<0){ci=cm.findColumnIndex(E);}ci=Math.max(0,ci);var Q=cm.getColumnId(ci);var tw=cm.getTotalWidth(false);
+var R=cm.getColumnWidth(ci);var cw=Math.min(Math.max(((w-tw)+R-2)-(w<=s.dom.offsetWidth?0:18),g.autoExpandMin),g.autoExpandMax);if(R!=cw){cm.setColumnWidth(ci,cw,true);gv.css.updateRule(gv.colSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");gv.css.updateRule(gv.hdSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");
+gv.updateSplitters();gv.layout(false,true);}}if(A){lw.show();mw.show();}},10);},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return;}this.layout();},appendFooter:function(A){return null;},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns",columnsWiderText:"Wider",columnsNarrowText:"Thinner"}
 );Roo.grid.GridView.ColumnDragZone=function(A,hd){Roo.grid.GridView.ColumnDragZone.superclass.constructor.call(this,A,hd,null);this.proxy.el.addClass('x-grid3-col-dd');};Roo.extend(Roo.grid.GridView.ColumnDragZone,Roo.grid.HeaderDragZone,{handleMouseDown:function(e){}
 ,callHandleMouseDown:function(e){Roo.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,e);}});
 // Roo/grid/SplitDragZone.js
index 3d82043..635f468 100644 (file)
@@ -55148,6 +55148,11 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
         s.setSize(vw, vh);
 
         var bt = this.getBodyTable();
+        
+        if(cm.getLockedCount() == cm.config.length){
+            bt = this.getLockedTable();
+        }
+        
         var ltWidth = hasLock ?
                       Math.max(this.getLockedTable().offsetWidth, this.lockedHd.dom.firstChild.offsetWidth) : 0;
 
index 541161b..91e1514 100644 (file)
@@ -38675,6 +38675,11 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
         s.setSize(vw, vh);
 
         var bt = this.getBodyTable();
+        
+        if(cm.getLockedCount() == cm.config.length){
+            bt = this.getLockedTable();
+        }
+        
         var ltWidth = hasLock ?
                       Math.max(this.getLockedTable().offsetWidth, this.lockedHd.dom.firstChild.offsetWidth) : 0;
 
index 9396e70..7f28c61 100644 (file)
@@ -1648,11 +1648,11 @@ this.updateSplitters();this.layout();this.grid.fireEvent("columnresize",i,w);},s
 B=Math.min(B||E,E);for(var i=A;i<=B;i++){var m=C[i],l=D[i];var h=Math.max(m.offsetHeight,l.offsetHeight);m.style.height=l.style.height=h+"px";}}},layout:function(A,B){var g=this.grid;var C=g.autoHeight;var D=16;var c=g.getGridEl(),cm=this.cm,E=g.autoExpandColumn,gv=this;
 if(!c.dom.offsetWidth){if(A){this.lockedWrap.show();this.mainWrap.show();}return;}var F=this.cm.isLocked(0);var G=this.headerPanel.getHeight();var H=this.footerPanel.getHeight();if(C){var ch=this.getBodyTable().offsetHeight+G+H+this.mainHd.getHeight();var I=ch+c.getBorderWidth("tb");
 if(g.maxHeight){I=Math.min(g.maxHeight,I);}c.setHeight(I);}if(g.autoWidth){c.setWidth(cm.getTotalWidth()+c.getBorderWidth('lr'));}var s=this.scroller;var J=c.getSize(true);this.el.setSize(J.width,J.height);this.headerPanel.setWidth(J.width);this.footerPanel.setWidth(J.width);
-var K=this.mainHd.getHeight();var vw=J.width;var vh=J.height-(G+H);s.setSize(vw,vh);var bt=this.getBodyTable();var L=F?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;var M=bt.offsetHeight;var N=L+bt.offsetWidth;var O=false,P=false;
-this.scrollSizer.setSize(N,M+K);var lw=this.lockedWrap,mw=this.mainWrap;var lb=this.lockedBody,mb=this.mainBody;setTimeout(function(){var t=s.dom.offsetTop;var w=s.dom.clientWidth,h=s.dom.clientHeight;lw.setTop(t);lw.setSize(L,h);mw.setLeftTop(L,t);mw.setSize(w-L,h);
-lb.setHeight(h-K);mb.setHeight(h-K);if(B!==true&&!gv.userResized&&E){var ci=cm.getIndexById(E);if(ci<0){ci=cm.findColumnIndex(E);}ci=Math.max(0,ci);var Q=cm.getColumnId(ci);var tw=cm.getTotalWidth(false);var R=cm.getColumnWidth(ci);var cw=Math.min(Math.max(((w-tw)+R-2)-(w<=s.dom.offsetWidth?0:18),g.autoExpandMin),g.autoExpandMax);
-if(R!=cw){cm.setColumnWidth(ci,cw,true);gv.css.updateRule(gv.colSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");gv.css.updateRule(gv.hdSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");gv.updateSplitters();gv.layout(false,true);}}if(A){lw.show();
-mw.show();}},10);},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return;}this.layout();},appendFooter:function(A){return null;},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns",columnsWiderText:"Wider",columnsNarrowText:"Thinner"}
+var K=this.mainHd.getHeight();var vw=J.width;var vh=J.height-(G+H);s.setSize(vw,vh);var bt=this.getBodyTable();if(cm.getLockedCount()==cm.config.length){bt=this.getLockedTable();}var L=F?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;
+var M=bt.offsetHeight;var N=L+bt.offsetWidth;var O=false,P=false;this.scrollSizer.setSize(N,M+K);var lw=this.lockedWrap,mw=this.mainWrap;var lb=this.lockedBody,mb=this.mainBody;setTimeout(function(){var t=s.dom.offsetTop;var w=s.dom.clientWidth,h=s.dom.clientHeight;
+lw.setTop(t);lw.setSize(L,h);mw.setLeftTop(L,t);mw.setSize(w-L,h);lb.setHeight(h-K);mb.setHeight(h-K);if(B!==true&&!gv.userResized&&E){var ci=cm.getIndexById(E);if(ci<0){ci=cm.findColumnIndex(E);}ci=Math.max(0,ci);var Q=cm.getColumnId(ci);var tw=cm.getTotalWidth(false);
+var R=cm.getColumnWidth(ci);var cw=Math.min(Math.max(((w-tw)+R-2)-(w<=s.dom.offsetWidth?0:18),g.autoExpandMin),g.autoExpandMax);if(R!=cw){cm.setColumnWidth(ci,cw,true);gv.css.updateRule(gv.colSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");gv.css.updateRule(gv.hdSelector+gv.idToCssName(Q),"width",(cw-gv.borderWidth)+"px");
+gv.updateSplitters();gv.layout(false,true);}}if(A){lw.show();mw.show();}},10);},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return;}this.layout();},appendFooter:function(A){return null;},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns",columnsWiderText:"Wider",columnsNarrowText:"Thinner"}
 );Roo.grid.GridView.ColumnDragZone=function(A,hd){Roo.grid.GridView.ColumnDragZone.superclass.constructor.call(this,A,hd,null);this.proxy.el.addClass('x-grid3-col-dd');};Roo.extend(Roo.grid.GridView.ColumnDragZone,Roo.grid.HeaderDragZone,{handleMouseDown:function(e){}
 ,callHandleMouseDown:function(e){Roo.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,e);}});
 // Roo/grid/SplitDragZone.js