Author: andrei_exadel
Date: 2008-06-30 09:33:59 -0400 (Mon, 30 Jun 2008)
New Revision: 9299
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
file upload transferring
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
---
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-06-30
12:34:35 UTC (rev 9298)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-06-30
13:33:59 UTC (rev 9299)
@@ -700,8 +700,8 @@
this.runUpload = false;
if (this.activeEntry) {
- if (this.isFlash) this._flashStop();
- else this.activeEntry.stop();
+ this.upload_stopped = true;
+ this.activeEntry.stop();
}
return false;
},
@@ -1186,12 +1186,13 @@
},
- _flashStop: function() {
+/* _flashStop: function() {
if (this.uploadIndex>=0) {
- this.flashComponent.cancelUploadFile(this.uploadIndex);
+ //this.flashComponent.cancelUploadFile(this.uploadIndex);
+ this.activeEntry.stop();
this._flashError(FileUploadEntry.UPLOAD_CANCELED);
}
- },
+ },*/
_flashOnProgress: function (bytesLoaded, bytesTotal)
{
@@ -1208,14 +1209,8 @@
_flashOnComplete: function () {
this.finishProgressBar();
- this._flashSetEntryState(this.uploadIndex, FileUploadEntry.UPLOAD_SUCCESS);
-
-/*
- !!! var restr =
iframeDocument.getElementById('_richfaces_file_upload_size_restricted');
-
- } else if (restr) {
- this.callback(FileUploadEntry.UPLOAD_SIZE_ERROR);
- */
+ this._flashSetEntryState(this.uploadIndex, (this.upload_stopped ?
FileUploadEntry.UPLOAD_CANCELED : FileUploadEntry.UPLOAD_SUCCESS));
+ this.upload_stopped=false;
},
_flashHTTPError: function (httpErrorNumber) {
Show replies by date