X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-all.js;h=0cc16b044273e44529de00eff29fce82d8c973e9;hp=4655b89aaa89d63e3d4ccc5df872830cd759bc83;hb=ff355e12aa44d689f8536251642f2963c7abbf1e;hpb=b7461d73dfdea1589c032014b34cb8415557af60 diff --git a/roojs-all.js b/roojs-all.js index 4655b89aaa..0cc16b0442 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -2289,10 +2289,11 @@ return;}if(E){Roo.MessageBox.updateProgress(E.bytes_uploaded/E.bytes_total,Math. this.form.afterAction(this,false);}},success:function(A){this.uploadComplete=true;if(this.haveProgress){Roo.MessageBox.hide();}var B=this.processResponse(A);if(B===true||B.success){this.form.afterAction(this,true);return;}if(B.errors){this.form.markInvalid(B.errors); this.failureType=Roo.form.Action.SERVER_INVALID;}this.form.afterAction(this,false);},failure:function(A){this.uploadComplete=true;if(this.haveProgress){Roo.MessageBox.hide();}this.response=A;this.failureType=Roo.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false); },handleResponse:function(A){if(this.form.errorReader){var rs=this.form.errorReader.read(A);var B=[];if(rs.records){for(var i=0,C=rs.records.length;i$/,'');}D=Roo.decode(rt);}catch(e){D={success:false,errorMsg:"Failed to read server message: "+(A?A.responseText:' - no message'),errors:[]} +;}return D;}});Roo.form.Action.Load=function(A,B){Roo.form.Action.Load.superclass.constructor.call(this,A,B);this.reader=this.form.reader;};Roo.extend(Roo.form.Action.Load,Roo.form.Action,{type:'load',run:function(){Roo.Ajax.request(Roo.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(false),params:this.getParams()} +));},success:function(A){var B=this.processResponse(A);if(B===true||!B.success||!B.data){this.failureType=Roo.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return;}this.form.clearInvalid();this.form.setValues(B.data);this.form.afterAction(this,true); +},handleResponse:function(A){if(this.form.reader){var rs=this.form.reader.read(A);var B=rs.records&&rs.records[0]?rs.records[0].data:null;return {success:rs.success,data:B};}return Roo.decode(A.responseText);}});Roo.form.Action.ACTION_TYPES={'load':Roo.form.Action.Load,'submit':Roo.form.Action.Submit} +; // Roo/form/Layout.js Roo.form.Layout=function(A){var B=[];if(A.items){B=A.items;delete A.items;}Roo.form.Layout.superclass.constructor.call(this,A);this.stack=[];Roo.each(B,this.addxtype,this);};Roo.extend(Roo.form.Layout,Roo.Component,{clear:true,labelSeparator:':',hideLabels:false,defaultAutoCreate:{tag:'div',cls:'x-form-ct'} ,isLayout:true,onRender:function(ct,A){if(this.el){this.el=Roo.get(this.el);}else{var B=this.getAutoCreate();this.el=ct.createChild(B,A);}if(this.style){this.el.applyStyles(this.style);}if(this.labelAlign){this.el.addClass('x-form-label-'+this.labelAlign);