Commit 43d4da3b authored by Fabien Morin's avatar Fabien Morin

improve sendPreferencesToServer js for checkboxes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31205 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c2b6f7f
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts41541110.71</string> </value> <value> <string>ts60374556.81</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value> <value> <string>application/javascript</string> </value>
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
...@@ -162,8 +162,8 @@ function sendPreferencesToServer(form_dom_id, view_form_url, \n ...@@ -162,8 +162,8 @@ function sendPreferencesToServer(form_dom_id, view_form_url, \n
var url="KnowledgeBox_baseEdit";\n var url="KnowledgeBox_baseEdit";\n
forEach(getElementsByTagAndClassName(\'input\', null, form_dom_id) , function (item) {\n forEach(getElementsByTagAndClassName(\'input\', null, form_dom_id) , function (item) {\n
if (item.type == "checkbox"){\n if (item.type == "checkbox"){\n
if (item.checked){request_str+=item.name + \'=\'+item.value+\'&\';}\n if (item.checked){request_str+=item.name + \':boolean=True&\';}\n
else {request_str+=item.name + \'=\';}}\n else {request_str+=item.name + \':boolean=False&\';}}\n
if (item.type == "radio"){\n if (item.type == "radio"){\n
if (item.checked){request_str+=item.name + \'=\'+item.value+\'&\';}}\n if (item.checked){request_str+=item.name + \'=\'+item.value+\'&\';}}\n
if (item.type == "text"){request_str+=item.name + \'=\' + item.value + \'&\';}\n if (item.type == "text"){request_str+=item.name + \'=\' + item.value + \'&\';}\n
...@@ -364,7 +364,8 @@ function initialize(){\n ...@@ -364,7 +364,8 @@ function initialize(){\n
}\n }\n
\n \n
// call function after load of document\n // call function after load of document\n
MochiKit.DOM.addLoadEvent(initialize); MochiKit.DOM.addLoadEvent(initialize);\n
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -374,7 +375,7 @@ MochiKit.DOM.addLoadEvent(initialize); ...@@ -374,7 +375,7 @@ MochiKit.DOM.addLoadEvent(initialize);
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>13306</int> </value> <value> <int>13319</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
435 436
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment