Author: andrei_exadel
Date: 2008-02-22 10:25:37 -0500 (Fri, 22 Feb 2008)
New Revision: 6300
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
fix uploading in _blank window in Firefox after ajax rerendering
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
15:17:57 UTC (rev 6299)
+++
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22
15:25:37 UTC (rev 6300)
@@ -386,7 +386,7 @@
this.stopScript = stopScript;
this.getFileSizeScript = getFileSizeScript;
- this.iframe = $(this.id + "_iframe");
+ this.iframe = this.createFrame();//$(this.id + "_iframe");
this.items = $(this.id + ":fileItems");
this.classes = classes;
this.events = events;
@@ -398,6 +398,18 @@
this.initEvents();
this.setupAutoUpload();
},
+
+ createFrame: function () {
+ var iframe = $(this.id + "_iframe");
+ if (!iframe) {
+ iframe = document.createElement("iframe");
+ iframe.id = this.id + "_iframe";
+ iframe.name = this.id;
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+ }
+ return iframe;
+ },
initEvents : function() {
for (var e in this.events) {
Modified: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
---
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-22
15:17:57 UTC (rev 6299)
+++
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-22
15:25:37 UTC (rev 6300)
@@ -40,7 +40,7 @@
<div class="upload_list_decor" style="width:
#{component.attributes['listWidth']}" id="#{clientId}">
-<iframe name="#{clientId}" id="#{clientId}_iframe"
style="display: none;"/>
+<!-- iframe name="ddd" id="#{clientId}_iframe"
style="display: none;"/ -->
<span style="display: none;">
<jsp:scriptlet>
Show replies by date