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);
Show replies by date