Commit a12a6e13 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Products.ERP5Type.JSON is deprecated, use json instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44127 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3fb4d567
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.JSON import dumps\n <value> <string>from json import dumps\n
\n \n
knowledge_pad = None\n knowledge_pad = None\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.JSON import dumps\n <value> <string>from json import dumps\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n \n
if active_knowledge_pad is None and js_call:\n if active_knowledge_pad is None and js_call:\n
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.JSONEncoder import encodeInJson\n <value> <string>from json import dumps\n
\n \n
# sometime instead of real knowledge pad object we may get just its relative url \n # sometime instead of real knowledge pad object we may get just its relative url \n
# and actually that\'s what we care for\n # and actually that\'s what we care for\n
...@@ -66,7 +66,7 @@ else:\n ...@@ -66,7 +66,7 @@ else:\n
editable_mode = 0\n editable_mode = 0\n
\n \n
js_update_code = """updater(\'%s\', \'%s\', \'%s\', \'%s\', %s, field_prefix=\'%s\');""" %(url, box_relative_url, dom_id, \n js_update_code = """updater(\'%s\', \'%s\', \'%s\', \'%s\', %s, field_prefix=\'%s\');""" %(url, box_relative_url, dom_id, \n
editable_mode, encodeInJson(params), field_prefix)\n editable_mode, dumps(params), field_prefix)\n
if box.getValidationState()==\'invisible\':\n if box.getValidationState()==\'invisible\':\n
# we can generate \n # we can generate \n
javascript_code = """invisible_gadgets["%s"]="%s";""" %(dom_id, js_update_code)\n javascript_code = """invisible_gadgets["%s"]="%s";""" %(dom_id, js_update_code)\n
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
Render an entire Pad and needed JavaScript code.\n Render an entire Pad and needed JavaScript code.\n
Used to make instant Pad switching.\n Used to make instant Pad switching.\n
"""\n """\n
from Products.ERP5Type.JSON import dumps\n from json import dumps\n
\n \n
pad = context.restrictedTraverse(pad_relative_url)\n pad = context.restrictedTraverse(pad_relative_url)\n
\n \n
......
705 706
\ 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