summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe.Boulain <>2009-07-22 06:22:38 +0000
committerChristophe.Boulain <>2009-07-22 06:22:38 +0000
commit4471057588998c9442a2bf683fc9c3d65d1e900b (patch)
tree5a85e193f64250848e1fe7b409105117ee90845c
parent5aaf2cecb4e365c5503c3167535303d3300a6b6d (diff)
Fixed #178
-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