X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-core-debug.js;h=1b155c5399e0ee6b62f5ea2328cefa36beac3ede;hp=03cebb1b2b5d497c9a514fcd6bbf77a32dc000d4;hb=refs%2Fheads%2Fwip_alan_T6011_fixing_surrogate_characters;hpb=d3774fe5e402568711ecdf98159de501cd062c33
diff --git a/roojs-core-debug.js b/roojs-core-debug.js
index 03cebb1b2b..1b155c5399 100644
--- a/roojs-core-debug.js
+++ b/roojs-core-debug.js
@@ -11471,16 +11471,17 @@ Roo.CompositeElementLite.prototype.on = Roo.CompositeElementLite.prototype.addLi
* @class Roo.data.Connection
* @extends Roo.util.Observable
* The class encapsulates a connection to the page's originating domain, allowing requests to be made
- * either to a configured URL, or to a URL specified at request time.
- *
+ * either to a configured URL, or to a URL specified at request time.
+ *
* Requests made by this class are asynchronous, and will return immediately. No data from
* the server will be available to the statement immediately following the {@link #request} call.
- * To process returned data, use a callback in the request options object, or an event listener.
- *
+ * To process returned data, use a callback in the request options object, or an event listener.
+ *
* Note: If you are doing a file upload, you will not get a normal response object sent back to
* your callback or event handler. Since the upload is handled via in IFRAME, there is no XMLHttpRequest.
* The response object is created using the innerHTML of the IFRAME's document as the responseText
- * property and, if present, the IFRAME's XML document as the responseXML property.
+ * property and, if present, the IFRAME's XML document as the responseXML property.
+ *
* This means that a valid XML or HTML document must be returned. If JSON data is required, it is suggested
* that it be placed either inside a <textarea> in an HTML document and retrieved from the responseText
* using a regex, or inside a CDATA section in an XML document and retrieved from the responseXML using
@@ -11612,6 +11613,11 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, {
url = url || form.action;
var enctype = form.getAttribute("enctype");
+
+ if (o.formData) {
+ return this.doFormDataUpload(o,p,url);
+ }
+
if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){
return this.doFormUpload(o, p, url);
}
@@ -11789,7 +11795,40 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, {
form.removeChild(hiddens[i]);
}
}
+ },
+ // this is a 'formdata version???'
+
+
+ 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(form) : o.formData;
+
+ var cb = {
+ success: this.handleResponse,
+ failure: this.handleFailure,
+ scope: this,
+ argument: {options: o},
+ timeout : o.timeout || this.timeout
+ };
+
+ if(typeof o.autoAbort == 'boolean'){ // options gets top priority
+ if(o.autoAbort){
+ this.abort();
+ }
+ }else if(this.autoAbort !== false){
+ this.abort();
+ }
+
+ //Roo.lib.Ajax.defaultPostHeader = null;
+ Roo.lib.Ajax.useDefaultHeader = false;
+ this.transId = Roo.lib.Ajax.request( "POST", url, cb, o.formData, o);
+ Roo.lib.Ajax.useDefaultHeader = true;
+
+
}
+
});
/*
* Based on:
@@ -16380,7 +16419,7 @@ Roo.apply(Roo.XComponent, {
break;
default:
- if (obj.disabled) {
+ if (obj.disabled || obj.region == '#disabled') {
return;
}
break;
@@ -16573,6 +16612,7 @@ Roo.apply(Roo.XComponent, {
msg: msg,
width:450,
progress:true,
+ buttons : false,
closable:false,
modal: false