[richfaces-svn-commits] JBoss Rich Faces SVN: r13871 - 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
Sat Apr 25 11:04:00 EDT 2009


Author: pyaschenko
Date: 2009-04-25 11:03:59 -0400 (Sat, 25 Apr 2009)
New Revision: 13871

Modified:
   trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-6846

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	2009-04-25 15:01:01 UTC (rev 13870)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js	2009-04-25 15:03:59 UTC (rev 13871)
@@ -777,8 +777,8 @@
 	clear: function(entry) {
 	if (this.disabled) return;
 		if (entry) {
-			this.remove(entry);
 			if (entry.state == FileUploadEntry.UPLOAD_SUCCESS) {
+				this.remove(entry);
 				if(this.events.onclear) {	
 		   			this.element.fire("rich:onclear", {entry : entry});
 				}
@@ -1183,7 +1183,7 @@
 				var params = {allowscriptaccess:true, menu: "false", wmode: "transparent", salign: "TL", scale: "noscale"};
 				
 				var attributes = {style:"position:absolute; top:0px; left:0px;"};
-				swfobject.embedSWF(this.options.flashComponentUrl, oid, "100%", "100%", "9.0.28", false, flashvars, params, attributes);
+				swfobject.embedSWF((window.location.protocol+"//"+ window.location.host+this.options.flashComponentUrl), oid, "100%", "100%", "9.0.28", false, flashvars, params, attributes);
 				
 				this.currentInput.parentNode.innerHTML = '<input type="text" style="cursor: pointer; right: 0px; top: 0px; font-size: 10em; position: absolute; padding: 0px" class="rich-fileupload-hidden" id="'+this.id+':file" name="'+this.id+':file"></input>'
 				this.currentInput = $(this.id + ":file");
@@ -1277,6 +1277,7 @@
 	},
 	
 	_flashGetActionUrl: function (url, entry) {
+		url = window.location.protocol+"//"+ window.location.host+url;
 		var getParams = "_richfaces_upload_uid="+ encodeURI(entry.uid) + "&" + this.id + "=" + this.id + "&_richfaces_upload_file_indicator=true&_richfaces_size="+entry.size+"&_richfaces_send_http_error=true";
 		if (/\?/.test(url)) {
 			var i = url.indexOf("?");




More information about the richfaces-svn-commits mailing list