cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltriel...@apache.org
Subject svn commit: r527845 - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src: changes/changes.xml main/resources/org/apache/cocoon/forms/flow/javascript/Form.js
Date Thu, 12 Apr 2007 08:57:18 GMT
Author: ltrieloff
Date: Thu Apr 12 01:57:16 2007
New Revision: 527845

URL: http://svn.apache.org/viewvc?view=rev&rev=527845
Log:
applied patch COCOON-2027, thanks to Jan Oberst

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/changes/changes.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/flow/javascript/Form.js

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/changes/changes.xml?view=diff&rev=527845&r1=527844&r2=527845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/changes/changes.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/changes/changes.xml Thu Apr 12
01:57:16 2007
@@ -27,8 +27,11 @@
         <release version="1.0.0-M1" date="2007-??-??" description="unreleased">   

           <action dev="reinhard" type="add">
             Initial creation.
-          </action>      
+          </action>
+          <action dev="ltrieloff" type="fix" issue="COCOON-2027">
+            Fixed AJAX form uploads with MSIE. Patch Contributed by Jan Oberst.
+          </action>
         </release>
       </body>
     </document>
-    
\ No newline at end of file
+    

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/flow/javascript/Form.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/flow/javascript/Form.js?view=diff&rev=527845&r1=527844&r2=527845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/flow/javascript/Form.js
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/flow/javascript/Form.js
Thu Apr 12 01:57:16 2007
@@ -220,10 +220,24 @@
                 var httpResponse = objectModel.get(org.apache.cocoon.environment.http.HttpEnvironment.HTTP_RESPONSE_OBJECT);
 
                 if (httpResponse) {
-                    httpResponse.setContentType("text/xml");
-                    var text = "<?xml version='1.0'?><bu:document xmlns:bu='" +
-                        org.apache.cocoon.ajax.BrowserUpdateTransformer.BU_NSURI +
-                        "'><bu:continue/></bu:document>";
+                    var text ="";
+                    if (cocoon.request.getParameter("dojo.transport")=="iframe") {
+			//MSIE accepts only HTML content when using the iframe
+			//dojo transport, so we have to wrap everything into
+			//html as demonstrated by IframeTransport-bu-styling.xsl
+                    	httpResponse.setContentType("text/html");
+                    	text = "<html><head><title>Browser Update Data-Island</title></head><body>"
+                    		+ "<form id='browser-update'>"
+                    		+ "<textarea name='continue'></textarea>"
+                    		+ "</form>"
+                    		+ "</body></html>";
+                    } else {
+                    	httpResponse.setContentType("text/xml");
+	                    text = "<?xml version='1.0'?><bu:document xmlns:bu='" +
+	                        org.apache.cocoon.ajax.BrowserUpdateTransformer.BU_NSURI +
+	                        "'><bu:continue/></bu:document>";
+	                    
+                    }
                     httpResponse.setContentLength(text.length);
                     httpResponse.writer.print(text);
                 } else {



Mime
View raw message