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

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Feb 22 11:48:43 EST 2008


Author: andrei_exadel
Date: 2008-02-22 11:48:43 -0500 (Fri, 22 Feb 2008)
New Revision: 6307

Modified:
   trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
delete frame after upload completed

Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js	2008-02-22 16:35:11 UTC (rev 6306)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js	2008-02-22 16:48:43 UTC (rev 6307)
@@ -376,6 +376,7 @@
 		this.element = $(this.id);
 		this._progressBar = $(progressBarId);
 		this.progressBar = this._progressBar.component;
+		this.entries = new Array(); 
 		
 		this.labelMarkup = label;
 		this.disabled = disabled;
@@ -408,8 +409,15 @@
 			iframe.style.display = 'none';
 			document.body.appendChild(iframe);
 		}
+		this.iframe = iframe;
 		return iframe;
 	},
+	
+	
+	deleteFrame: function() {
+		this.iframe.src = "about:blank";
+		document.body.removeChild(this.iframe);
+	},
 
 	initEvents : function() {
 		for (var e in this.events) {
@@ -665,6 +673,7 @@
 
 	_endUpload: function() {
 		this.activeEntry = null;
+		this.deleteFrame();
 	},
 	
 	_updateEntriesState: function() {




More information about the richfaces-svn-commits mailing list