Author: andrei_exadel
Date: 2008-05-13 07:51:58 -0400 (Tue, 13 May 2008)
New Revision: 8550
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
RF-3407
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-05-13
11:25:06 UTC (rev 8549)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-05-13
11:51:58 UTC (rev 8550)
@@ -116,6 +116,8 @@
fileInput: null,
+ fileName: null,
+
uploadObject: null,
state: FileUploadEntry.INITIALIZED,
@@ -125,6 +127,7 @@
this.uploadObject = uploadObject;
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('');
Element.insert(this.uploadObject.items, content);
@@ -558,7 +561,7 @@
if (!this.options.noDuplicate) return true;
var fileName = elt.value;
for (var i = 0; i < this.entries.length; i++) {
- if (fileName == this.entries[i].fileInput.value) {
+ if (fileName == this.entries[i].fileName) {
return false;
}
}
Modified: trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-05-13
11:25:06 UTC (rev 8549)
+++ trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-05-13
11:51:58 UTC (rev 8550)
@@ -59,8 +59,6 @@
<div class="rich-fileupload-list-decor" style="width:
#{listWidth}" id="#{clientId}">
<f:call name="utils.encodeBeginFormIfNessesary" />
-<!-- iframe name="ddd" id="#{clientId}_iframe"
style="display: none;"/ -->
-
<span style="display: none;">
<jsp:scriptlet>
<![CDATA[
@@ -101,10 +99,6 @@
</div>
</div>
- <!-- todo review -->
-
- <!-- -->
-
<div class="rich-fileupload-button-border" style=" float:right;
display: none;">
<div class="rich-fileupload-button rich-fileupload-font
#{component.attributes['cleanButtonClass']}"
onmouseover="this.className='rich-fileupload-button-light
rich-fileupload-font'"
onmousedown="this.className='rich-fileupload-button-press
rich-fileupload-font'" onmouseup="this.className='rich-fileupload-button
rich-fileupload-font'"
onmouseout="this.className='rich-fileupload-button
rich-fileupload-font'"
@@ -120,10 +114,8 @@
</tr>
</table>
- <div class="rich-fileupload-list-overflow #{uploadListClass}"
style="width: 100%; height: #{listHeight}"
id="#{clientId}:fileItems">
+ <div class="rich-fileupload-list-overflow #{uploadListClass}"
style="width: 100%; height: #{listHeight}"
id="#{clientId}:fileItems"></div>
- </div>
-
<span>
<script type="text/javascript">
FileUpload.CLASSES = {
@@ -188,7 +180,5 @@
</span>
<f:call name="utils.encodeEndFormIfNessesary" />
</div>
-
-
</f:root>
\ No newline at end of file
Show replies by date