From c1afa03dc5aa8ed6964ec9a1c855fa8088d9ac46 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 28 Feb 2020 16:01:15 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- roojs-all.js | 2 +- roojs-debug.js | 4 ++-- roojs-ui-debug.js | 4 ++-- roojs-ui.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index cd32f0907f..19f94c487f 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1772,7 +1772,7 @@ if(i<1){el.setHeight(h'+this.loadingText+'':'');this.restrictHeight();this.selectedIndex=-1;},onLoad:function(a,b,c,d){if(!this.hasFocus){return; }if(this.store.getCount()>0){this.expand();this.restrictHeight();}else{this.onEmptyResults();}},onLoadException:function(){this.collapse();Roo.log(this.store.reader.jsonData);if(this.store&&typeof(this.store.reader.jsonData.errorMsg)!='undefined'){Roo.MessageBox.alert("Error loading",this.store.reader.jsonData.errorMsg); }},onSelectChange:function(A,B,C){var ix=A.getSelectedIndexes();if(C.list>this.maxColumns-2){this.setFromData(ix.length?A.store.getAt(ix[0]).data:{});return;}if(!ix.length){this.setFromData({});var D=this.stores[C.list+1];D.removeAll();return;}var E=A.store.getAt(ix[0]); -if(!this.isLoading){this.setFromData(E.data);}var lw=Math.floor(((this.listWidth*this.maxColumns||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/this.maxColumns);this.stores[C.list+1].loadDataFromChildren(E);var dl=this.stores[C.list+1].getTotalCount(); +this.setFromData(E.data);var lw=Math.floor(((this.listWidth*this.maxColumns||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/this.maxColumns);this.stores[C.list+1].loadDataFromChildren(E);var dl=this.stores[C.list+1].getTotalCount(); this.views[C.list+1].getEl().setHeight(this.innerLists[0].getHeight());this.views[C.list+1].getEl().setStyle({display:dl?'block':'none'});this.innerLists[C.list+1].setHeight(this.innerLists[0].getHeight());this.list.setWidth(lw*(C.list+(dl?2:1)));if(this.isLoading){} },onDoubleClick:function(){this.collapse();},recordToStores:function(A,B,C,D){var E=new Roo.data.SimpleStore({reader:this.store.reader,data:[]});var F=this;var G=false;var H=false;if(A.getCount()<1){return false;}A.each(function(r){if(r.data[B]==C){G=r;H=r; return false;}if(r.data.cn&&r.data.cn.length){E.loadDataFromChildren(r);var I=F.recordToStores(E,B,C,D);if(I!==false){G=I;H=r;return false;}}return true;});if(G==false){return false}D.unshift(H);return G;},selectActive:function(){var A=[];this.findRecordInStore(this.store,this.hiddenName,this.getValue(),A); diff --git a/roojs-debug.js b/roojs-debug.js index db405fd5b1..414b6ba509 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -42997,9 +42997,9 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { } var rec = view.store.getAt(ix[0]); - if (!this.isLoading) { + //if (!this.isLoading) { this.setFromData(rec.data); - } + //} var lw = Math.floor( diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index c96043bd05..d95396f909 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20513,9 +20513,9 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { } var rec = view.store.getAt(ix[0]); - if (!this.isLoading) { + //if (!this.isLoading) { this.setFromData(rec.data); - } + //} var lw = Math.floor( diff --git a/roojs-ui.js b/roojs-ui.js index e6d8765c5c..ebdd6fade3 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -902,7 +902,7 @@ if(i<1){el.setHeight(h'+this.loadingText+'':'');this.restrictHeight();this.selectedIndex=-1;},onLoad:function(a,b,c,d){if(!this.hasFocus){return; }if(this.store.getCount()>0){this.expand();this.restrictHeight();}else{this.onEmptyResults();}},onLoadException:function(){this.collapse();Roo.log(this.store.reader.jsonData);if(this.store&&typeof(this.store.reader.jsonData.errorMsg)!='undefined'){Roo.MessageBox.alert("Error loading",this.store.reader.jsonData.errorMsg); }},onSelectChange:function(A,B,C){var ix=A.getSelectedIndexes();if(C.list>this.maxColumns-2){this.setFromData(ix.length?A.store.getAt(ix[0]).data:{});return;}if(!ix.length){this.setFromData({});var D=this.stores[C.list+1];D.removeAll();return;}var E=A.store.getAt(ix[0]); -if(!this.isLoading){this.setFromData(E.data);}var lw=Math.floor(((this.listWidth*this.maxColumns||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/this.maxColumns);this.stores[C.list+1].loadDataFromChildren(E);var dl=this.stores[C.list+1].getTotalCount(); +this.setFromData(E.data);var lw=Math.floor(((this.listWidth*this.maxColumns||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/this.maxColumns);this.stores[C.list+1].loadDataFromChildren(E);var dl=this.stores[C.list+1].getTotalCount(); this.views[C.list+1].getEl().setHeight(this.innerLists[0].getHeight());this.views[C.list+1].getEl().setStyle({display:dl?'block':'none'});this.innerLists[C.list+1].setHeight(this.innerLists[0].getHeight());this.list.setWidth(lw*(C.list+(dl?2:1)));if(this.isLoading){} },onDoubleClick:function(){this.collapse();},recordToStores:function(A,B,C,D){var E=new Roo.data.SimpleStore({reader:this.store.reader,data:[]});var F=this;var G=false;var H=false;if(A.getCount()<1){return false;}A.each(function(r){if(r.data[B]==C){G=r;H=r; return false;}if(r.data.cn&&r.data.cn.length){E.loadDataFromChildren(r);var I=F.recordToStores(E,B,C,D);if(I!==false){G=I;H=r;return false;}}return true;});if(G==false){return false}D.unshift(H);return G;},selectActive:function(){var A=[];this.findRecordInStore(this.store,this.hiddenName,this.getValue(),A); -- 2.39.2