From ca04f44796522273dd71dd38191616378487355e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 10 Feb 2020 14:30:04 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- roojs-all.js | 2 +- roojs-debug.js | 2 +- roojs-ui-debug.js | 2 +- roojs-ui.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 943def14ae..2ccbbc18c1 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1772,7 +1772,7 @@ il.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>1){this.setFromData(ix.length?A.store.getAt(ix[0]).data:{});return;}if(!ix.length){this.setFromData({});this.stores[C.list+1].loadData([]);return;}var D=A.store.getAt(ix[0]);this.setFromData(D.data); -var lw=Math.floor(((this.listWidth*3||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/3);var E=typeof(D.data.cn)=='undefined'?[]:D.data.cn;var dl=typeof(E.data.cn)!='undefined'?E.total:E.length;this.stores[C.list+1].loadData(E); +var lw=Math.floor(((this.listWidth*3||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/3);var E=typeof(D.data.cn)=='undefined'?[]:D.data.cn;var dl=typeof(E.data)!='undefined'?E.total:E.length;this.stores[C.list+1].loadData(E); 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)));},onDoubleClick:function(){this.collapse(); },findRecord:function(A,B){return this.findRecordInStore(this.store,A,B);},findRecordInStore:function(A,B,C){var D=new Roo.data.SimpleStore({reader:this.store.reader,data:[]});var E=this;var F=false;if(A.getCount()>0){A.each(function(r){if(r.data[B]==C){F=r; return false;}if(r.data.cn&&r.data.cn.length){D.loadData(r.data.cn);var G=E.findRecordInStore(D,B,C);if(G!==false){F=G;return false;}}return true;});}return F;}}); diff --git a/roojs-debug.js b/roojs-debug.js index 8b30f08924..568cbd11ae 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -42965,7 +42965,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { ((this.listWidth * 3 || Math.max(this.wrap.getWidth(), this.minListWidth)) - this.list.getFrameWidth('lr')) / 3 ); var data = typeof(rec.data.cn) == 'undefined' ? [] : rec.data.cn; - var dl = typeof(data.data.cn) != 'undefined' ? data.total : data.length; ///json is a nested response.. + var dl = typeof(data.data) != 'undefined' ? data.total : data.length; ///json is a nested response.. this.stores[opts.list+1].loadData( data ); this.views[opts.list+1].getEl().setHeight( this.innerLists[0].getHeight()); this.views[opts.list+1].getEl().setStyle({ display : dl ? 'block' : 'none' }); diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 5175d05a47..4aab511eb8 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20481,7 +20481,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { ((this.listWidth * 3 || Math.max(this.wrap.getWidth(), this.minListWidth)) - this.list.getFrameWidth('lr')) / 3 ); var data = typeof(rec.data.cn) == 'undefined' ? [] : rec.data.cn; - var dl = typeof(data.data.cn) != 'undefined' ? data.total : data.length; ///json is a nested response.. + var dl = typeof(data.data) != 'undefined' ? data.total : data.length; ///json is a nested response.. this.stores[opts.list+1].loadData( data ); this.views[opts.list+1].getEl().setHeight( this.innerLists[0].getHeight()); this.views[opts.list+1].getEl().setStyle({ display : dl ? 'block' : 'none' }); diff --git a/roojs-ui.js b/roojs-ui.js index 36720cc557..fdb862326a 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -902,7 +902,7 @@ il.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>1){this.setFromData(ix.length?A.store.getAt(ix[0]).data:{});return;}if(!ix.length){this.setFromData({});this.stores[C.list+1].loadData([]);return;}var D=A.store.getAt(ix[0]);this.setFromData(D.data); -var lw=Math.floor(((this.listWidth*3||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/3);var E=typeof(D.data.cn)=='undefined'?[]:D.data.cn;var dl=typeof(E.data.cn)!='undefined'?E.total:E.length;this.stores[C.list+1].loadData(E); +var lw=Math.floor(((this.listWidth*3||Math.max(this.wrap.getWidth(),this.minListWidth))-this.list.getFrameWidth('lr'))/3);var E=typeof(D.data.cn)=='undefined'?[]:D.data.cn;var dl=typeof(E.data)!='undefined'?E.total:E.length;this.stores[C.list+1].loadData(E); 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)));},onDoubleClick:function(){this.collapse(); },findRecord:function(A,B){return this.findRecordInStore(this.store,A,B);},findRecordInStore:function(A,B,C){var D=new Roo.data.SimpleStore({reader:this.store.reader,data:[]});var E=this;var F=false;if(A.getCount()>0){A.each(function(r){if(r.data[B]==C){F=r; return false;}if(r.data.cn&&r.data.cn.length){D.loadData(r.data.cn);var G=E.findRecordInStore(D,B,C);if(G!==false){F=G;return false;}}return true;});}return F;}}); -- 2.39.2