diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_generateAjaxCall.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_generateAjaxCall.xml index 2bc3d97a87baa4ae1423d89ddb3208ce1f381cdf..7463fb446fb71dd1ff337e1203d1a8259f8ebdf3 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_generateAjaxCall.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_generateAjaxCall.xml @@ -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> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml index 8984c3365dddec83474439c83753f2b26450234d..242d08223bc3917181ac812de9b5c1d1bb7b589d 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml @@ -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> diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index d15aedf3cab40e1bd6a8dca13a9664f92cf3a880..89395971e9853143546b02e46e9668a159e77187 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -692 \ No newline at end of file +693 \ No newline at end of file