summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY3
-rwxr-xr-xframework/Web/Javascripts/source/prado/activefileupload/activefileupload.js41
2 files changed, 33 insertions, 11 deletions
diff --git a/HISTORY b/HISTORY
index 3348ed56..ff23b961 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,11 +1,12 @@
Version 3.1.6 to be released
BUG: Issue#98 - Missing file in quickstart demo (Chrisotphe)
+BUG: Issue#105 - Enabling/disabling TFileUpload on TPanel (Carl)
BUG: Issue#115 - Clientside registry of serverside controls don't cover all controls: Prado.WebUI.TAutoComplete, Prado.WebUI.TInPlaceTextBox (Yves)
BUG: Issue#117 - Consider TValidationSummary.DisplayMode="HeaderOnly" if TValidationSummary.ShowMessageBox is set (Yves)
BUG: Issue#164 - CultureInfo::validCulture should be declared as a static method (Christophe)
BUG: Issue#168 - TSqlMapXmlConfiguration: CacheModel properties are not set (Yves)
BUG: Issue#172 - TDbCache fails to recognize need to re-create cache table (Yves)
-BUG: Issue#105 - Enabling/disabling TFileUpload on TPanel (Carl)
+BUG: Issue#178 - TActiveFileUpload progress indicator is misleading (Christophe, googlenew-at-pcforum.hu)
ENH: Issue#174 - TErrorHandler: HTTP error messages contains sensitive information (Yves)
ENH: Issue#175 - TBulletedList: Introduce TBulletStyle::None (Yves)
ENH: Issue#176 - THttpResponse::writeFile() add additional parameters to take more influence on behavior (forceDownload, clientFileName, fileSize), add png to defaultMimeTypes (Yves)
diff --git a/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js b/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js
index 7a1e0e77..222b9fe3 100755
--- a/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js
+++ b/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js
@@ -36,20 +36,41 @@ Prado.WebUI.TActiveFileUpload = Base.extend(
},
finishUpload : function(options){
+
+ if (this.options.targetID == options.targetID)
+ {
+ this.finishoptions = options;
+ var e = this;
+ var callback =
+ {
+ 'CallbackParameter' : options || '',
+ 'onSuccess' : function() { e.finishCallBack(true); },
+ 'onFailure' : function() { e.finishCallBack(false); }
+ };
+
+ Object.extend(callback, this.options);
+
+ request = new Prado.CallbackRequest(this.options.EventTarget, callback);
+ request.dispatch();
+ }
+ else
+ this.finishCallBack(true);
+
+ },
+
+ finishCallBack : function(success){
// hide the display indicator.
this.flag.value = '';
this.indicator.style.display = 'none';
- if (this.options.targetID == options.targetID){
- // show the complete indicator.
- if (options.errorCode == 0){
- this.complete.style.display = '';
- this.input.value = '';
- } else {
- this.error.style.display = '';
- }
- Prado.Callback(this.options.EventTarget, options, null, this.options);
- }
+ // show the complete indicator.
+ if ((this.finishoptions.errorCode == 0) && (success)) {
+ this.complete.style.display = '';
+ this.input.value = '';
+ } else {
+ this.error.style.display = '';
+ }
}
+
},
{
// class methods