Author: pyaschenko
Date: 2008-09-26 10:05:00 -0400 (Fri, 26 Sep 2008)
New Revision: 10576
Modified:
trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/fileUploadComponent.swf
Log:
https://jira.jboss.org/jira/browse/RF-4533
Modified: trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as
===================================================================
--- trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as 2008-09-26 14:04:47 UTC (rev
10575)
+++ trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as 2008-09-26 14:05:00 UTC (rev
10576)
@@ -21,6 +21,7 @@
private var noDuplicate: Boolean;
private var maxFiles: Number;
private var fileTypes: Array;
+ private var uploadIndex: Number;
public function FileUploadComponent() {
this.fileDataList = new Array();
@@ -29,6 +30,7 @@
this.noDuplicate = true;
this.maxFiles = 5;
this.fileTypes = null;
+ this.uploadIndex = -1;
ExternalInterface.addCallback("browse", this, browse);
ExternalInterface.addCallback("setProperties", this, setProperties);
@@ -55,12 +57,15 @@
public function removeFile(index:Number)
{
+ if (index<this.uploadIndex) this.uploadIndex--;
this.fileRefList.splice(index, 1);
this.fileDataList.splice(index, 1);
+ return this.uploadIndex;
}
public function uploadFile(index, actionURL, postData)
{
+ this.uploadIndex = index;
var item: FileReference = fileRefList[index];
if (item)
{
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/fileUploadComponent.swf
===================================================================
(Binary files differ)