[richfaces-svn-commits] JBoss Rich Faces SVN: r9220 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Jun 25 09:47:55 EDT 2008


Author: andrei_exadel
Date: 2008-06-25 09:47:54 -0400 (Wed, 25 Jun 2008)
New Revision: 9220

Modified:
   trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
add detailed file info to JS API (only for flesh)

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-25 13:47:40 UTC (rev 9219)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js	2008-06-25 13:47:54 UTC (rev 9220)
@@ -122,10 +122,16 @@
 
 	state: FileUploadEntry.INITIALIZED,
 	
-	initialize: function(fileInput, uploadObject) {
+	initialize: function(fileInput, uploadObject, size, type, creator, creationDate, modificationDate) {
 		this.fileInput = fileInput;
 		this.uploadObject = uploadObject;
 		
+		this.size = size;
+		this.type = type;
+		this.creator = creator;
+		this.creationDate = creationDate;
+		this.modificationDate  = modificationDate;
+		
 		var fileName = JSNode.prototype.xmlEscape($F(this.fileInput));
 		this.fileName = fileName;
 		var content = FileUploadEntry.template.invoke('getContent', {fileName: fileName, fileEntryWidth: uploadObject.getFileEntryWidth(), className : this.uploadObject.classes.FILE_ENTRY.ENABLED }).join('');
@@ -1097,9 +1103,10 @@
 		var filesArray = [];
 		for (var i=this.entries.length; i<files.length;i++)
 		{
+			var file = files[i];
 			this.currentInput.value = files[i].name;
 			this.createFrame();
-			var newEntry = new FileUploadEntry(this.currentInput, this);
+			var newEntry = new FileUploadEntry(this.currentInput, this, file.size, file.type, file.creator, file.creationDate, file.modificationDate);
 			this.entries.push(newEntry);
 			filesArray.push(newEntry);
 			




More information about the richfaces-svn-commits mailing list