From 44432cb093c911c92f0c957fc1285367ea1c4aa1 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 27 Dec 2018 16:21:29 +0800 Subject: [PATCH] Roo/data/Connection.js roojs-debug.js roojs-all.js roojs-core.js roojs-core-debug.js --- Roo/data/Connection.js | 4 ++-- roojs-all.js | 6 +++--- roojs-core-debug.js | 4 ++-- roojs-core.js | 6 +++--- roojs-debug.js | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Roo/data/Connection.js b/Roo/data/Connection.js index ae5227a933..96ae6e8386 100644 --- a/Roo/data/Connection.js +++ b/Roo/data/Connection.js @@ -344,9 +344,9 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, { doFormDataUpload : function(o, ps, url) { - + var form = Roo.getDom(o.form); form.enctype = form.encoding = 'multipart/form-data'; - var formData = o.formData === true ? new FormData(Roo.getDom(o.form)) : o.formData; + var formData = o.formData === true ? new FormData(form) : o.formData; var cb = { success: this.handleResponse, diff --git a/roojs-all.js b/roojs-all.js index a7619ec241..d6e3620993 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -484,9 +484,9 @@ Roo.callback(B.callback,B.scope,[B,false,A]);},doFormUpload:function(o,ps,A){var }var C=Roo.getDom(o.form);C.target=id;C.method='POST';C.enctype=C.encoding='multipart/form-data';if(A){C.action=A;}var D,hd;if(ps){D=[];ps=Roo.urlDecode(ps,false);for(var k in ps){if(ps.hasOwnProperty(k)){hd=document.createElement('input');hd.type='hidden'; hd.name=k;hd.value=ps[k];C.appendChild(hd);D.push(hd);}}}function cb(){var r={responseText:'',responseXML:null};r.argument=o?o.argument:null;try{var F;if(Roo.isIE){F=B.contentWindow.document;}else{F=(B.contentDocument||window.frames[id].document);}if(F&&F.body){r.responseText=F.body.innerHTML; }if(F&&F.XMLDocument){r.responseXML=F.XMLDocument;}else{r.responseXML=F;}}catch(e){}Roo.EventManager.removeListener(B,'load',cb,this);this.fireEvent("requestcomplete",this,r,o);Roo.callback(o.success,o.scope,[r,o]);Roo.callback(o.callback,o.scope,[o,true,r]); -setTimeout(function(){document.body.removeChild(B);},100);}Roo.EventManager.on(B,'load',cb,this);C.submit();if(D){for(var i=0,E=D.length;i