From 04ce7598f41b7f2f3d60928443ed4e8592b6934d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 2 Dec 2019 16:11:47 +0800 Subject: [PATCH] Uncommited changes synced --- Roo/data/Connection.js | 2 +- roojs-all.js | 4 ++-- roojs-core-debug.js | 2 +- roojs-core.js | 4 ++-- roojs-debug.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Roo/data/Connection.js b/Roo/data/Connection.js index cf3a67f6bd..884caa5383 100644 --- a/Roo/data/Connection.js +++ b/Roo/data/Connection.js @@ -203,7 +203,7 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, { url += (url.indexOf('?') != -1 ? '&' : '?') + p; p = ''; } - Roo.lib.Ajax.useDefaultHeader == typeof(o.headers['Content-Type']) == 'undefined'; + Roo.lib.Ajax.useDefaultHeader = typeof(o.headers) == 'undefined' || typeof(o.headers['Content-Type']) == 'undefined'; this.transId = Roo.lib.Ajax.request(method, url, cb, p, o); Roo.lib.Ajax.useDefaultHeader == true; return this.transId; diff --git a/roojs-all.js b/roojs-all.js index 4767dbecd2..97b7f4bd05 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -477,8 +477,8 @@ if(typeof p=="function"){p=p.call(o.scope||window,o);}if(typeof p=="object"){p=R }if(o.form){var C=Roo.getDom(o.form);B=B||C.action;var D=C.getAttribute("enctype");if(o.formData){return this.doFormDataUpload(o,p,B);}if(o.isUpload||(D&&D.toLowerCase()=='multipart/form-data')){return this.doFormUpload(o,p,B);}var f=Roo.lib.Ajax.serializeForm(C); p=p?(p+'&'+f):f;}var hs=o.headers;if(this.defaultHeaders){hs=Roo.apply(hs||{},this.defaultHeaders);if(!o.headers){o.headers=hs;}}var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:o},timeout:o.timeout||this.timeout} ;var E=o.method||this.method||(p?"POST":"GET");if(E=='GET'&&(this.disableCaching&&o.disableCaching!==false)||o.disableCaching===true){B+=(B.indexOf('?')!=-1?'&':'?')+'_dc='+(new Date().getTime());}if(typeof o.autoAbort=='boolean'){if(o.autoAbort){this.abort(); -}}else if(this.autoAbort!==false){this.abort();}if((E=='GET'&&p)||o.xmlData){B+=(B.indexOf('?')!=-1?'&':'?')+p;p='';}Roo.lib.Ajax.useDefaultHeader==typeof(o.headers['Content-Type'])=='undefined';this.transId=Roo.lib.Ajax.request(E,B,cb,p,o);Roo.lib.Ajax.useDefaultHeader==true; -return this.transId;}else{Roo.callback(o.callback,o.scope,[o,null,null]);return null;}},isLoading:function(A){if(A){return Roo.lib.Ajax.isCallInProgress(A);}else{return this.transId?true:false;}},abort:function(A){if(A||this.isLoading()){Roo.lib.Ajax.abort(A||this.transId); +}}else if(this.autoAbort!==false){this.abort();}if((E=='GET'&&p)||o.xmlData){B+=(B.indexOf('?')!=-1?'&':'?')+p;p='';}Roo.lib.Ajax.useDefaultHeader=typeof(o.headers)=='undefined'||typeof(o.headers['Content-Type'])=='undefined';this.transId=Roo.lib.Ajax.request(E,B,cb,p,o); +Roo.lib.Ajax.useDefaultHeader==true;return this.transId;}else{Roo.callback(o.callback,o.scope,[o,null,null]);return null;}},isLoading:function(A){if(A){return Roo.lib.Ajax.isCallInProgress(A);}else{return this.transId?true:false;}},abort:function(A){if(A||this.isLoading()){Roo.lib.Ajax.abort(A||this.transId); }},handleResponse:function(A){this.transId=false;var B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestcomplete",this,A,B);Roo.callback(B.success,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,true,A]);},handleFailure:function(A,e){this.transId=false; var B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestexception",this,A,B,e);Roo.callback(B.failure,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,false,A]);},doFormUpload:function(o,ps,A){var id=Roo.id();var B=document.createElement('iframe'); B.id=id;B.name=id;B.className='x-hidden';if(Roo.isIE){B.src=Roo.SSL_SECURE_URL;}document.body.appendChild(B);if(Roo.isIE){document.frames[id].name=id;}var C=Roo.getDom(o.form);C.target=id;C.method='POST';C.enctype=C.encoding='multipart/form-data';if(A){C.action=A; diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 240f9bee29..5ab13f3721 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -11659,7 +11659,7 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, { url += (url.indexOf('?') != -1 ? '&' : '?') + p; p = ''; } - Roo.lib.Ajax.useDefaultHeader == typeof(o.headers['Content-Type']) == 'undefined'; + Roo.lib.Ajax.useDefaultHeader = typeof(o.headers) == 'undefined' || typeof(o.headers['Content-Type']) == 'undefined'; this.transId = Roo.lib.Ajax.request(method, url, cb, p, o); Roo.lib.Ajax.useDefaultHeader == true; return this.transId; diff --git a/roojs-core.js b/roojs-core.js index 7230b3c487..26dd48afa9 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -477,8 +477,8 @@ if(typeof p=="function"){p=p.call(o.scope||window,o);}if(typeof p=="object"){p=R }if(o.form){var C=Roo.getDom(o.form);B=B||C.action;var D=C.getAttribute("enctype");if(o.formData){return this.doFormDataUpload(o,p,B);}if(o.isUpload||(D&&D.toLowerCase()=='multipart/form-data')){return this.doFormUpload(o,p,B);}var f=Roo.lib.Ajax.serializeForm(C); p=p?(p+'&'+f):f;}var hs=o.headers;if(this.defaultHeaders){hs=Roo.apply(hs||{},this.defaultHeaders);if(!o.headers){o.headers=hs;}}var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:o},timeout:o.timeout||this.timeout} ;var E=o.method||this.method||(p?"POST":"GET");if(E=='GET'&&(this.disableCaching&&o.disableCaching!==false)||o.disableCaching===true){B+=(B.indexOf('?')!=-1?'&':'?')+'_dc='+(new Date().getTime());}if(typeof o.autoAbort=='boolean'){if(o.autoAbort){this.abort(); -}}else if(this.autoAbort!==false){this.abort();}if((E=='GET'&&p)||o.xmlData){B+=(B.indexOf('?')!=-1?'&':'?')+p;p='';}Roo.lib.Ajax.useDefaultHeader==typeof(o.headers['Content-Type'])=='undefined';this.transId=Roo.lib.Ajax.request(E,B,cb,p,o);Roo.lib.Ajax.useDefaultHeader==true; -return this.transId;}else{Roo.callback(o.callback,o.scope,[o,null,null]);return null;}},isLoading:function(A){if(A){return Roo.lib.Ajax.isCallInProgress(A);}else{return this.transId?true:false;}},abort:function(A){if(A||this.isLoading()){Roo.lib.Ajax.abort(A||this.transId); +}}else if(this.autoAbort!==false){this.abort();}if((E=='GET'&&p)||o.xmlData){B+=(B.indexOf('?')!=-1?'&':'?')+p;p='';}Roo.lib.Ajax.useDefaultHeader=typeof(o.headers)=='undefined'||typeof(o.headers['Content-Type'])=='undefined';this.transId=Roo.lib.Ajax.request(E,B,cb,p,o); +Roo.lib.Ajax.useDefaultHeader==true;return this.transId;}else{Roo.callback(o.callback,o.scope,[o,null,null]);return null;}},isLoading:function(A){if(A){return Roo.lib.Ajax.isCallInProgress(A);}else{return this.transId?true:false;}},abort:function(A){if(A||this.isLoading()){Roo.lib.Ajax.abort(A||this.transId); }},handleResponse:function(A){this.transId=false;var B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestcomplete",this,A,B);Roo.callback(B.success,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,true,A]);},handleFailure:function(A,e){this.transId=false; var B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestexception",this,A,B,e);Roo.callback(B.failure,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,false,A]);},doFormUpload:function(o,ps,A){var id=Roo.id();var B=document.createElement('iframe'); B.id=id;B.name=id;B.className='x-hidden';if(Roo.isIE){B.src=Roo.SSL_SECURE_URL;}document.body.appendChild(B);if(Roo.isIE){document.frames[id].name=id;}var C=Roo.getDom(o.form);C.target=id;C.method='POST';C.enctype=C.encoding='multipart/form-data';if(A){C.action=A; diff --git a/roojs-debug.js b/roojs-debug.js index 724a531f5f..225968839e 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -11659,7 +11659,7 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, { url += (url.indexOf('?') != -1 ? '&' : '?') + p; p = ''; } - Roo.lib.Ajax.useDefaultHeader == typeof(o.headers['Content-Type']) == 'undefined'; + Roo.lib.Ajax.useDefaultHeader = typeof(o.headers) == 'undefined' || typeof(o.headers['Content-Type']) == 'undefined'; this.transId = Roo.lib.Ajax.request(method, url, cb, p, o); Roo.lib.Ajax.useDefaultHeader == true; return this.transId; -- 2.39.2