X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-all.js;h=6643a7c03c50c504db50be800012151c947b7ca9;hb=d760d9f97b3fc0143e0c6ebbe93bdf8cb4892872;hp=083d7c3af33a5a5100fad7e323dfddb8f8da07e9;hpb=43e2affb94432796fc7e44c5e5fea62901333485;p=roojs1 diff --git a/roojs-all.js b/roojs-all.js index 083d7c3af3..6643a7c03c 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1772,8 +1772,8 @@ 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;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:E.length?'block':'none'});this.innerLists[C.list+1].setHeight(this.innerLists[0].getHeight());this.list.setWidth(lw*(C.list+(E.length?2:1)));},onDoubleClick:function(){this.collapse();},findRecord:function(A,B){return this.findRecordInStore(this.store,A,B); +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)?E.data.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;}}); // Roo/form/Checkbox.js