From: Alan Knowles Date: Wed, 18 Aug 2021 08:31:19 +0000 (+0800) Subject: popover column resizing on grids X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=a6573a80df44dfb589e3779cf9028b8f81a490fa popover column resizing on grids --- diff --git a/Roo/bootstrap/Table.js b/Roo/bootstrap/Table.js index 6ece84b941..c7ba3e366e 100644 --- a/Roo/bootstrap/Table.js +++ b/Roo/bootstrap/Table.js @@ -82,11 +82,12 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @cfg {Boolean} headerShow (true|false) generate thead, default true * @cfg {Boolean} rowSelection (true|false) default false * @cfg {Boolean} cellSelection (true|false) default false - * @cfg {Boolean} scrollBody (true|false) default false - body scrolled / fixed header + * @cfg {Boolean} scrollBody (true|false) default false - body scrolled / fixed header (with resizable columns) * @cfg {Roo.bootstrap.PagingToolbar} footer a paging toolbar * @cfg {Boolean} lazyLoad auto load data while scrolling to the end (default false) * @cfg {Boolean} auto_hide_footer auto hide footer if only one page (default false) - * @cfg {Boolean} enableColumnResize default true if columns can be resized (drag/drop) + * @cfg {Boolean} enableColumnResize default true if columns can be resized = needs scrollBody to be set to work (drag/drop) + * * @cfg {Number} minColumnWidth default 50 pixels minimum column width * * @constructor @@ -499,7 +500,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { } styles.push('#' , this.id , ' .x-hcol-' , i, " { ", width, hidden," }\n", - '#' , this.id , ' .x-grid-split-' , i, " { ", left, splithide,'height:', (headHeight - 4), "px;}\n" + '#' , this.id , ' .x-grid-split-' , i, " { ", left, splithide, 'height:', (headHeight - 4), "px;}\n", + // this is the popover version.. + '.popover-inner #' , this.id , ' .x-grid-split-' , i, " { ", left, splithide, 'height:', 100, "%;}\n" ); } diff --git a/docs/src/Roo_data_HttpProxy.js.html b/docs/src/Roo_data_HttpProxy.js.html index 7cf5d1a3cd..52b00a8fdb 100644 --- a/docs/src/Roo_data_HttpProxy.js.html +++ b/docs/src/Roo_data_HttpProxy.js.html @@ -133,7 +133,7 @@ o.request.callback.call(o.request.scope, { success : false, raw : { - errorMsg : response + errorMsg : response.responseText } }, o.request.arg, false); diff --git a/roojs-all.js b/roojs-all.js index 1e86893359..a5cb448985 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -962,7 +962,7 @@ Roo.data.MemoryProxy=function(A){if(A.data){A=A.data;}Roo.data.MemoryProxy.super Roo.data.HttpProxy=function(A){Roo.data.HttpProxy.superclass.constructor.call(this);this.conn=A;this.useAjax=!A||!A.events;};Roo.extend(Roo.data.HttpProxy,Roo.data.DataProxy,{getConnection:function(){return this.useAjax?Roo.Ajax:this.conn;},load:function(A,B,C,D,E){if(this.fireEvent("beforeload",this,A)!==false){var o={params:A||{} ,request:{callback:C,scope:D,arg:E},reader:B,callback:this.loadResponse,scope:this};if(this.useAjax){Roo.applyIf(o,this.conn);if(this.activeRequest){Roo.Ajax.abort(this.activeRequest);}this.activeRequest=Roo.Ajax.request(o);}else{this.conn.request(o);}}else{C.call(D||this,null,E,false); }},loadResponse:function(o,A,B){delete this.activeRequest;if(!A){this.fireEvent("loadexception",this,o,B);o.request.callback.call(o.request.scope,null,o.request.arg,false);return;}var C;try{C=o.reader.read(B);}catch(e){this.fireEvent("loadexception",this,o,B,e); -o.request.callback.call(o.request.scope,{success:false,raw:{errorMsg:B}},o.request.arg,false);return;}this.fireEvent("load",this,o,o.request.arg);o.request.callback.call(o.request.scope,C,o.request.arg,true);},update:function(A){},updateResponse:function(A){} +o.request.callback.call(o.request.scope,{success:false,raw:{errorMsg:B.responseText}},o.request.arg,false);return;}this.fireEvent("load",this,o,o.request.arg);o.request.callback.call(o.request.scope,C,o.request.arg,true);},update:function(A){},updateResponse:function(A){} }); // Roo/data/ScriptTagProxy.js Roo.data.ScriptTagProxy=function(A){Roo.data.ScriptTagProxy.superclass.constructor.call(this);Roo.apply(this,A);this.head=document.getElementsByTagName("head")[0];};Roo.data.ScriptTagProxy.TRANS_ID=1000;Roo.extend(Roo.data.ScriptTagProxy,Roo.data.DataProxy,{timeout:30000,callbackParam:"callback",nocache:true,load:function(A,B,C,D,E){if(this.fireEvent("beforeload",this,A)!==false){var p=Roo.urlEncode(Roo.apply(A,this.extraParams)); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index b11f948c6e..9e6e7e8521 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -9148,11 +9148,12 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @cfg {Boolean} headerShow (true|false) generate thead, default true * @cfg {Boolean} rowSelection (true|false) default false * @cfg {Boolean} cellSelection (true|false) default false - * @cfg {Boolean} scrollBody (true|false) default false - body scrolled / fixed header + * @cfg {Boolean} scrollBody (true|false) default false - body scrolled / fixed header (with resizable columns) * @cfg {Roo.bootstrap.PagingToolbar} footer a paging toolbar * @cfg {Boolean} lazyLoad auto load data while scrolling to the end (default false) * @cfg {Boolean} auto_hide_footer auto hide footer if only one page (default false) - * @cfg {Boolean} enableColumnResize default true if columns can be resized (drag/drop) + * @cfg {Boolean} enableColumnResize default true if columns can be resized = needs scrollBody to be set to work (drag/drop) + * * @cfg {Number} minColumnWidth default 50 pixels minimum column width * * @constructor @@ -9565,7 +9566,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { } styles.push('#' , this.id , ' .x-hcol-' , i, " { ", width, hidden," }\n", - '#' , this.id , ' .x-grid-split-' , i, " { ", left, splithide,'height:', (headHeight - 4), "px;}\n" + '#' , this.id , ' .x-grid-split-' , i, " { ", left, splithide, 'height:', (headHeight - 4), "px;}\n", + // this is the popover version.. + '.popover-inner #' , this.id , ' .x-grid-split-' , i, " { ", left, splithide, 'height:', 100, "%;}\n" ); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index de4881349d..2ef7132a20 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -405,7 +405,7 @@ this.resizeProxy=Roo.get(document.body).createChild({cls:"x-grid-resize-proxy",h },initCSS:function(){var cm=this.cm,A=[];this.CSS.removeStyleSheet(this.id+'-cssrules');var B=this.headEl?this.headEl.dom.clientHeight:0;var sz=Roo.getGridSize();var C=0;var D=-1;var E=[];var F=0;for(var i=0,G=cm.getColumnCount();i0){D=i}C+=w;E.push({rel:w,abs:false});}var H=this.bodyEl.dom.clientWidth-F;var I=Math.floor(H/C);var J=H-(I*C); var K,L,M=0,N,O;for(var i=0,G=cm.getColumnCount();i