You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/07/24 00:08:23 UTC

svn commit: r679209 - /lenya/trunk/src/modules-core/sitemanagement/resources/javascript/metadata.js

Author: andreas
Date: Wed Jul 23 15:08:23 2008
New Revision: 679209

URL: http://svn.apache.org/viewvc?rev=679209&view=rev
Log:
Set charset header for Dojo request (see http://ospublish.wordpress.com/2008/06/09/encoding-of-dojo-xhrpost-parameters-in-safari/), see bug 45462.

Modified:
    lenya/trunk/src/modules-core/sitemanagement/resources/javascript/metadata.js

Modified: lenya/trunk/src/modules-core/sitemanagement/resources/javascript/metadata.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/sitemanagement/resources/javascript/metadata.js?rev=679209&r1=679208&r2=679209&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/sitemanagement/resources/javascript/metadata.js (original)
+++ lenya/trunk/src/modules-core/sitemanagement/resources/javascript/metadata.js Wed Jul 23 15:08:23 2008
@@ -34,6 +34,9 @@
       error: function(type, data, evt) {
         alert("An error occurred.");
       },
+      headers: { 
+        "Content-Type" : "application/x-www-form-urlencoded; charset=utf-8"
+      },
       load: function(type, data, evt) {
         var result = data.replace(/\s/g, "");
         if (result == "concurrent-change") {
@@ -53,27 +56,3 @@
     dojo.io.bind(bindArgs);
   }
 
-  /*
-  function saveMetaData(namespace, element, oldValue) {
-    var id = element + "@" + namespace;
-    var bindArgs = {
-      method: "post",
-      error: function(type, data, evt) {
-        alert("An error occurred.");
-      },
-      load: function(type, data, evt) {
-        var result = data.replace(/\s/g, "");
-        if (result = "concurrent-change") {
-          alert("Value can't be saved, concurrent change detected.");
-        }
-        else {
-          var successIndicator = dojo.byId(id);
-          successIndicator.style.visibility = "visible";
-        }
-      },
-      mimetype: "text/plain",
-      formNode: dojo.byId("form_" + id)
-    };
-    dojo.io.bind(bindArgs);
-  }
-*/
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org