Commit 05f47d3e authored by Fabien Morin's avatar Fabien Morin

- expression "{}.fromkeys(field_key_list);" makes AssertionError and break RSS Feeds gadget

- add 1 to KnowledgePad_generateAjaxCall parameters, this is to ignore_security_check : in case of rss gadget displayed to annonymous users, we want the user to be able to click on the rss feed to expand informations. (But move gadget and configure it is not allowed)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30485 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d3f3548e
...@@ -75,7 +75,8 @@ ...@@ -75,7 +75,8 @@
dom_id python: request.get(\'dom_id\',None) or box_id;\n dom_id python: request.get(\'dom_id\',None) or box_id;\n
is_gadget_mode request/is_gadget_mode | nothing;\n is_gadget_mode request/is_gadget_mode | nothing;\n
list_style python:request.get(\'list_style\', None);\n list_style python:request.get(\'list_style\', None);\n
field_key_list python:[\'field_title\',\'field_date\',\'field_content\',\'field_img\',\'field_link\',\'field_others_links\',\'field_md5\',\'field_sender\'];\n value_dict python: {\'field_title\':None, \'field_date\': None, \'field_content\':None,\'field_img\':None,\'field_link\':None,\'field_others_links\':None,\'field_md5\':None,\'field_sender\':None};\n
html_dict python: {\'field_title\':None, \'field_date\': None, \'field_content\':None,\'field_img\':None,\'field_link\':None,\'field_others_links\':None,\'field_md5\':None,\'field_sender\':None};\n
dummy python: context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \n dummy python: context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \n
\'text/html;; charset=utf-8\');"\n \'text/html;; charset=utf-8\');"\n
metal:define-macro="main">\n metal:define-macro="main">\n
...@@ -140,9 +141,7 @@ ...@@ -140,9 +141,7 @@
\n \n
<ul>\n <ul>\n
<tal:block tal:repeat="line line_list">\n <tal:block tal:repeat="line line_list">\n
<li tal:define="value_dict python:{}.fromkeys(field_key_list);\n <li tal:define="empty python:value_dict.update(zip(here.getColumnAliasList(), [i[0] for i in line.getValueList()]));\n
html_dict python:{}.fromkeys(field_key_list);\n
empty python:value_dict.update(zip(here.getColumnAliasList(), [i[0] for i in line.getValueList()]));\n
empty python:html_dict.update(zip(here.getColumnAliasList(), [i[0] for i in line.render()]));"\n empty python:html_dict.update(zip(here.getColumnAliasList(), [i[0] for i in line.render()]));"\n
tal:attributes="id python:(value_dict[\'field_img\'] and \'with_img\') or \'\';">\n tal:attributes="id python:(value_dict[\'field_img\'] and \'with_img\') or \'\';">\n
<input tal:condition="not: repeat/line/index"\n <input tal:condition="not: repeat/line/index"\n
...@@ -153,7 +152,7 @@ ...@@ -153,7 +152,7 @@
onmouseout="this.style.backgroundColor=\'inherit\';"\n onmouseout="this.style.backgroundColor=\'inherit\';"\n
tal:attributes="class python:value_dict[\'field_md5\'] in read_item_list and \'read\' or \'\';\n tal:attributes="class python:value_dict[\'field_md5\'] in read_item_list and \'read\' or \'\';\n
title python:value_dict[\'field_sender\'];\n title python:value_dict[\'field_sender\'];\n
onclick python:\'if(this.className!=\\\'read\\\'){MochiKit.Async.doSimpleXMLHttpRequest(\\\'Base_setRssItemReadInSelection\\\', {\\\'selection_name\\\':\\\'\'+selection_name+\'\\\',\\\'item\\\':\\\'\'+ \'%s\' % value_dict[\'field_md5\']+\'\\\'});;this.className=\\\'read\\\';;\'+real_context.KnowledgePad_generateAjaxCall(\'%s/Base_formatRssTitleWithUnreadItemCount\' % context_url,box,\'rss_title_\'+box.getId(),{\'rss_title\':rss_title,\'total_line\':total_line,\'selection_name\':selection_name})+\'}toggle(\\\'description_\'+box.getId()+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n onclick python:\'if(this.className!=\\\'read\\\'){MochiKit.Async.doSimpleXMLHttpRequest(\\\'Base_setRssItemReadInSelection\\\', {\\\'selection_name\\\':\\\'\'+selection_name+\'\\\',\\\'item\\\':\\\'\'+ \'%s\' % value_dict[\'field_md5\']+\'\\\'});;this.className=\\\'read\\\';;\'+real_context.KnowledgePad_generateAjaxCall(\'%s/Base_formatRssTitleWithUnreadItemCount\' % context_url,box,\'rss_title_\'+box.getId(),{\'rss_title\':rss_title,\'total_line\':total_line,\'selection_name\':selection_name}, 1)+\'}toggle(\\\'description_\'+box.getId()+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n
<tal:block tal:condition="python:value_dict[\'field_img\']"\n <tal:block tal:condition="python:value_dict[\'field_img\']"\n
tal:content="structure python:html_dict[\'field_img\']">image</tal:block>\n tal:content="structure python:html_dict[\'field_img\']">image</tal:block>\n
<a><span tal:content="python:value_dict[\'field_title\']">title</span>\n <a><span tal:content="python:value_dict[\'field_title\']">title</span>\n
......
416 418
\ 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