This commit is contained in:
2024-11-05 10:47:20 -07:00
parent c801b1ff51
commit 5315c47fcd
276 changed files with 2990 additions and 6370 deletions

View File

@@ -38,9 +38,9 @@ Sys.Extended.UI.AsyncFileUpload = function(element) {
/// <summary>
/// A name of the form.
/// </summary>
/// <getter>get_postBackUrl</getter>
/// <setter>set_postBackUrl</setter>
/// <member name="cP:AjaxControlToolkit.AsyncFileUpload.postBackUrl" />
/// <getter>get_formName</getter>
/// <setter>set_formName</setter>
/// <member name="cP:AjaxControlToolkit.AsyncFileUpload.formName" />
this._formName = "";
this._iframe = null;
this._waitTimer = null;
@@ -139,13 +139,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
set_postBackUrl: function(value) {
this._postBackUrl = value;
},
/// <summary>
/// Name of the form
/// </summary>
/// <getter>get_formName</getter>
/// <setter>set_formName</setter>
/// <member name="cP:AjaxControlToolkit.AsyncFileUpload.formName" />
get_formName: function() {
return this._formName;
},
@@ -379,7 +373,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
var mainForm = document.getElementById(this._formName);
this._removeTimer();
this.setThrobber(false);
mainForm.target = "_top";
this._restoreFormTarget(mainForm);
mainForm.action = this._postBackUrl;
var length;
var contentType = "";
@@ -428,7 +422,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
var url = this._postBackUrl;
url += url.indexOf("?") === -1 ? "?" : "&";
mainForm.action = url + 'AsyncFileUploadID=' + this.get_element().id + '&rnd=' + Math.random().toString().replace(/\./g, "");
mainForm.target = this._iframeName;
this._changeFormTarget(mainForm);
cleanup = false;
this.setThrobber(true);
setTimeout(function() {
@@ -491,7 +485,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
}
this._removeTimer();
mainForm.target = "_top";
this._restoreFormTarget(mainForm);
mainForm.action = this._postBackUrl;
if(this.get_completeBackColor() != "") {
if(this._innerTB != null) {
@@ -506,7 +500,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
}
catch(ex) {
this._removeTimer();
mainForm.target = "_top";
this._restoreFormTarget(mainForm);
mainForm.action = this._postBackUrl;
this._onError(ex.message);
}
@@ -532,6 +526,16 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
setTimeout(function() { uploader._onError(Sys.Extended.UI.Resources.AsyncFileUpload_UploadingProblem); }, 0);
this._waitTimer = null;
}
},
_changeFormTarget: function(form) {
this._mainFormOldTarget = form.target;
form.target = this._iframeName;
},
_restoreFormTarget: function(form) {
form.target = this._mainFormOldTarget;
this._mainFormOldTarget = undefined;
}
}