From: Alan Knowles Date: Fri, 28 Feb 2020 08:00:38 +0000 (+0800) Subject: roojs-ui.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=b026a3713ae7467f1d43c2ba9393a0a0eae4bab6 roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- diff --git a/roojs-all.js b/roojs-all.js index 387453c3fc..cd32f0907f 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1773,8 +1773,8 @@ this.list.endUpdate();},onBeforeLoad:function(){if(!this.hasFocus){return;}this. }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.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){this.selectActive(C.list); -}},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; +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); }}); // Roo/form/Checkbox.js diff --git a/roojs-debug.js b/roojs-debug.js index b8378db223..db405fd5b1 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -43014,7 +43014,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { this.list.setWidth(lw * (opts.list + (dl ? 2 : 1))); if (this.isLoading) { - this.selectActive(opts.list); + // this.selectActive(opts.list); } }, diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index b3c69c446e..c96043bd05 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20530,7 +20530,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { this.list.setWidth(lw * (opts.list + (dl ? 2 : 1))); if (this.isLoading) { - this.selectActive(opts.list); + // this.selectActive(opts.list); } }, diff --git a/roojs-ui.js b/roojs-ui.js index f3cea85fe7..e6d8765c5c 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -903,8 +903,8 @@ this.list.endUpdate();},onBeforeLoad:function(){if(!this.hasFocus){return;}this. }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.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){this.selectActive(C.list); -}},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; +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); }}); // Roo/form/Checkbox.js