X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-all.js;h=2ccbbc18c1daf840a25546713c2fcdc298c182df;hb=ca04f44796522273dd71dd38191616378487355e;hp=943def14ae784335a558f8daec0ba91dbe51b1ef;hpb=c77e2e6e548e55a4fabc2ec5f5cd49bf765edfa4;p=roojs1 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;}});