Commit b36bee68 authored by Ivan Tyagov's avatar Ivan Tyagov

Remove never used argument from updater API.

Clean up.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43374 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8dab621a
......@@ -50,22 +50,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if not ignore_security_check:\n
pass\n
#if context.portal_membership.isAnonymousUser():\n
# # anonymous user is not allowed to use AJAX gadgets\n
# return """alert("%s");""" %context.Base_translateString(\n
# "This function is available only for logged in users!")\n
\n
# pass current_web_section (if available so we can send it to server in next\n
# asynchronous request and server can set it in context.REQUEST\n
from Products.ERP5Type.JSONEncoder import encodeInJson\n
current_web_section_url = \'\'\n
current_web_section = context.REQUEST.get(\'current_web_section\', context.getWebSiteValue())\n
if current_web_section is not None:\n
current_web_section_url = current_web_section.getRelativeUrl()\n
if params is None:\n
params = {}\n
<value> <string>from Products.ERP5Type.JSONEncoder import encodeInJson\n
\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
......@@ -81,20 +66,20 @@ if editable_mode in (\'True\', True, 1):\n
editable_mode = 1\n
else:\n
editable_mode = 0\n
js_update_code = """updater(\'%s\', \'%s\', \'%s\', \'%s\', \'%s\', %s);""" %(url, box_relative_url, dom_id, \n
current_web_section_url, editable_mode, encodeInJson(params))\n
js_update_code = """updater(\'%s\', \'%s\', \'%s\', \'%s\', %s);""" %(url, box_relative_url, dom_id, \n
editable_mode, encodeInJson(params))\n
if box.getValidationState()==\'invisible\':\n
# we can generate \n
s = """invisible_gadgets["%s"]="%s";""" %(dom_id, js_update_code)\n
javascript_code = """invisible_gadgets["%s"]="%s";""" %(dom_id, js_update_code)\n
else:\n
s = js_update_code\n
javascript_code = js_update_code\n
\n
return s\n
return javascript_code\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>url, box, dom_id, params=None, ignore_security_check=0</string> </value>
<value> <string>url, box, dom_id, params={}, ignore_security_check=0</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts95876458.14</string> </value>
<value> <string>ts97860745.08</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -76,7 +76,7 @@ function createCookie(name, value, days, path) {\n
}\n
\n
function updater(url, box_relative_url, dom_id, \n
parent_web_section_url, editable_mode, additionnal_request_params){\n
editable_mode, additionnal_request_params){\n
/* Get content from server */\n
request_params = {};\n
additionnal_request_params = typeof(additionnal_request_params) != \'undefined\' ? additionnal_request_params : [];\n
......@@ -110,7 +110,6 @@ function updater(url, box_relative_url, dom_id, \n
function (key, value){request_params[key] = additionnal_request_params[key];});\n
\n
request_params["box_relative_url"] = box_relative_url;\n
request_params["parent_web_section_url"] = parent_web_section_url; \n
request_params["is_gadget_mode:int"] = 1; \n
request_params["editable_mode:int"] = editable_mode; \n
\n
......@@ -488,7 +487,7 @@ $(document).ready(initialize);\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>18185</int> </value>
<value> <int>18091</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
692
\ No newline at end of file
693
\ 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