Uncommited changes synced
authorAlan Knowles <alan@roojs.com>
Mon, 2 Dec 2019 08:11:47 +0000 (16:11 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 2 Dec 2019 08:11:47 +0000 (16:11 +0800)
Roo/data/Connection.js
roojs-all.js
roojs-core-debug.js
roojs-core.js
roojs-debug.js

index cf3a67f..884caa5 100644 (file)
@@ -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;
index 4767dbe..97b7f4b 100644 (file)
@@ -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;
index 240f9be..5ab13f3 100644 (file)
@@ -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;
index 7230b3c..26dd48a 100644 (file)
@@ -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;
index 724a531..2259688 100644 (file)
@@ -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;