[richfaces-svn-commits] JBoss Rich Faces SVN: r11885 - 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
Thu Dec 18 11:50:28 EST 2008
Author: nbelaevski
Date: 2008-12-18 11:50:28 -0500 (Thu, 18 Dec 2008)
New Revision: 11885
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-4716
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-12-18 16:49:27 UTC (rev 11884)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-18 16:50:28 UTC (rev 11885)
@@ -632,13 +632,22 @@
}
return true;
},
-
+
add: function(elt) {
if (this.disabled) return;
if (!this.checkFileType(elt.value) || !this.checkDuplicated(elt)) {
+ var fileName = elt.value;
+
+ //clear input value
+ var newUpload = elt.cloneNode(true);
+ newUpload.value = '';
+ elt.parentNode.replaceChild(newUpload, elt);
+ this.currentInput = newUpload;
+
if(this.events.ontyperejected) {
- this.element.fire("rich:ontyperejected", { fileName : elt.value });
+ this.element.fire("rich:ontyperejected", { fileName : fileName });
}
+
return;
}
More information about the richfaces-svn-commits
mailing list