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

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.