Commit ece76348 authored by Ivan Tyagov's avatar Ivan Tyagov

Remove deprecated and replaced by unified listbox listbox page template.

Clean up gadgets CSS which should not override listbox CSS.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38485 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 260cc7ec
......@@ -275,7 +275,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>listbox_field_img</string> </value>
<value> <string>Logo</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
tal:define="field_id here/getId;\n
form_id python: here.getForm().id;\n
selection_name here/getSelectionName;\n
line_start python: here.getLineStart();\n
real_context here/getContext;\n
context_url real_context/absolute_url;\n
line_list here/query;\n
portal here/getPortalObject;\n
anonymous portal/portal_membership/isAnonymousUser;\n
selection_params python: here.getSelection().getParams();\n
read_item_list python:selection_params.get(\'rss_read_item:list\', {});\n
read_items_count python:len(read_item_list);\n
rss_title here/getTitle;\n
rss_link here/getListActionUrl;\n
rss_logo python:request.get(\'rss_logo\',None);\n
search_text python: selection_params.get(\'search_text\', \'\');\n
show_select_column here/showSelectColumn;\n
show_search_line here/showSearchLine;\n
is_domain_tree_mode here/isDomainTreeMode;\n
listbox_max_lines python: int(here.getMaxLineNumber());\n
total_line python: here.total_size;\n
total_page python: here.total_pages;\n
page_id python: here.current_page;\n
current_page python: page_id + 1;\n
previous_page python: current_page - 1;\n
next_page python: current_page + 1;\n
current_page_max python: listbox_max_lines * current_page;\n
current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
current_page_stop python: (total_line < current_page_max) and total_line or current_page_max;\n
box_relative_url python: request.get(\'box_relative_url\', \'\');\n
box python: real_context.restrictedTraverse(box_relative_url); \n
box_id python: \'visual_\'+box.getId();\n
dom_id python: request.get(\'dom_id\',None) or box_id;\n
is_gadget_mode request/is_gadget_mode | nothing;\n
list_style python:request.get(\'list_style\', None);\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
\'text/html;; charset=utf-8\');\n
is_default_listbox_field python: field_id==\'listbox\';"\n
metal:define-macro="main">\n
\n
<!-- ListBox starts here -->\n
<input type="hidden" \n
name="list_selection_name" \n
value="default" \n
tal:attributes="value selection_name" />\n
\n
<input type="hidden" \n
name="list_selection_name" \n
value="default" \n
tal:attributes="name python:field_id+\'_list_selection_name\';value selection_name" />\n
\n
<input type="hidden" \n
name="search_text" \n
value="default" \n
tal:attributes="value python: request.get(\'search_text\',\'\')" />\n
\n
<input type="hidden" \n
name="gadget_form_id" \n
tal:attributes="value form_id" />\n
\n
<tal:replace tal:content="nothing">\n
Because TAL cannot accept unbalanced tags, the support for a domain tree is realized by a macro.\n
The macro ListBoxContainer is a no-op, if not in domain tree mode. Otherwise, the macro constructs\n
a domain tree and extracts the body in an extra table.\n
</tal:replace>\n
\n
<tal:block tal:define="expand python: 0">\n
<tal:block metal:define-macro="ListBoxContainer">\n
<tal:block tal:condition="expand">\n
<tal:block tal:condition="not: is_domain_tree_mode">\n
<tal:block metal:define-slot="ListBoxBody" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="expand python: 1;\n
table_form_id request/current_form_id | form_id;\n
N_ python: real_context.Base_translateString;">\n
<tal:block metal:use-macro="template/macros/ListBoxContainer">\n
<tal:block metal:fill-slot="ListBoxBody">\n
\n
<div class="list_style">\n
\n
<!-- Refresh -->\n
\n
<a class="right" tal:attributes="onclick python:real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id, {}, 1)"><img alt="" tal:attributes="onload python:\'if(\\\'\'+rss_title.replace(\'\\\'\',\'\')+\'\\\'==\\\'Please enter a valid Rss or Atom url in the edit form\\\'){showElement(\\\'edit_form_\'+box_id+\'\\\');;}\'" src="refresh.png"/></a>\n
\n
<!-- Feed Title -->\n
<tal:block tal:condition="anonymous">\n
<a class="title" tal:condition="python: here.field.get_value(\'list_action\')"\n
tal:attributes="href rss_link; target string:_blank; id python:\'rss_title_\'+box_id"\n
tal:content="rss_title"/>\n
<span class="title" tal:condition="python: not here.field.get_value(\'list_action\')"\n
tal:attributes="id python:\'rss_title_\'+box_id"\n
tal:content="rss_title"/>\n
</tal:block>\n
<tal:block tal:condition="not: anonymous">\n
<a class="title" tal:condition="python: here.field.get_value(\'list_action\')"\n
tal:attributes="href rss_link; target string:_blank; id python:\'rss_title_\'+box_id"\n
tal:content="python:real_context.Base_formatRssTitleWithUnreadItemCount(rss_title=rss_title,selection_name=selection_name,total_line=total_line)"/>\n
<span class="title" tal:condition="python:not here.field.get_value(\'list_action\')"\n
tal:attributes="id python:\'rss_title_\'+box_id"\n
tal:content="python:real_context.Base_formatRssTitleWithUnreadItemCount(rss_title=rss_title,selection_name=selection_name,total_line=total_line)"/>\n
</tal:block>\n
\n
<p class="clear"></p>\n
\n
<!-- Message list -->\n
\n
<ul>\n
<tal:block tal:repeat="line line_list">\n
<li tal:define="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
tal:attributes="id python:(value_dict[\'field_img\'] and \'with_img\') or \'\';">\n
<input tal:condition="not: repeat/line/index"\n
type="hidden" value="1" name="listbox_uid:list"\n
tal:attributes="value python: line.getUid() or \'\';\n
name string:${field_id}_uid:list" />\n
<tal:block tal:condition="anonymous">\n
<div onmouseover="this.style.backgroundColor=\'#ECECEC\';"\n
onmouseout="this.style.backgroundColor=\'inherit\';"\n
tal:attributes="class python:value_dict[\'field_md5\'] in read_item_list and \'read\' or \'\';\n
title python:value_dict[\'field_sender\'];\n
onclick python:\'toggle(\\\'description_\'+box_id+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n
<tal:block tal:condition="python:value_dict[\'field_img\']"\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
<span tal:attributes="class string: transparent;"\n
tal:condition="python:value_dict[\'field_date\']"\n
tal:content="structure python:\' - %s\' % html_dict[\'field_date\']">date</span></a>\n
</div>\n
</tal:block>\n
<tal:block tal:condition="not: anonymous">\n
<div onmouseover="this.style.backgroundColor=\'#ECECEC\';"\n
onmouseout="this.style.backgroundColor=\'inherit\';"\n
tal:attributes="class python:value_dict[\'field_md5\'] in read_item_list and \'read\' or \'\';\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_id,{\'rss_title\':rss_title,\'total_line\':total_line,\'selection_name\':selection_name}, 1)+\'}toggle(\\\'description_\'+box_id+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n
<tal:block tal:condition="python:value_dict[\'field_img\']"\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
<span tal:attributes="class string: transparent;"\n
tal:condition="python:value_dict[\'field_date\']"\n
tal:content="structure python:\' - %s\' % html_dict[\'field_date\']">date</span></a>\n
</div>\n
</tal:block>\n
<p class="clear"></p>\n
<div tal:attributes="id python:\'description_\'+box_id+\'_\'+str(repeat[\'line\'].index)"\n
class="content" style="display:none;">\n
<p tal:condition="python:value_dict[\'field_content\']"\n
tal:content="structure python:value_dict[\'field_content\']"/>\n
<div id="others_links">\n
<tal:block tal:repeat="other_link python:value_dict[\'field_others_links\']">\n
<a tal:content="structure other_link" />\n
<br/>\n
</tal:block>\n
</div>\n
<!-- XXX: See for mutli-image\n
<tal:block tal:condition="python: len(value_dict[\'field_img\']) > 1">\n
<img tal:repeat="img python: value_dict[\'field_img\'][1:]"\n
tal:attributes="src img; alt python:\'\'"/>\n
<br/>\n
</tal:block>\n
-->\n
<a tal:condition="python:value_dict[\'field_link\']"\n
tal:attributes="target string: _blank; href python:value_dict[\'field_link\']">Show original item</a>\n
</div>\n
</li>\n
</tal:block>\n
</ul>\n
\n
<!-- Page navigation -->\n
<tal:block tal:condition="not: anonymous">\n
<div class="pageNavigation" style="white-space: nowrap; vertical-align: middle; text-align: right;"\n
tal:attributes="colspan python: len(here.getSelectedColumnList()) + bool(show_select_column)">\n
<tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n
</div>\n
</tal:block>\n
\n
<br/>\n
<img tal:condition="rss_logo" tal:attributes="src rss_logo" alt="" height="20" class="right"/>\n
\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<!-- ListBox ends here -->\n
\n
</tal:block>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ListBox_asListStyleHTML</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Listbox as list renderer</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -59,7 +59,6 @@
#\n
# BBB: For the history, erp5.css is included by css_list_template.\n
# So this script has nothing to do in reality.\n
\n
css_list = (\'erp5_knowledge_box.css\',)\n
return css_list\n
</string> </value>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts84964412.54</string> </value>
<value> <string>ts84986036.79</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -474,47 +474,19 @@ div.block div.list_style ul li div#title{\n
cursor:pointer;\n
}\n
\n
.pageNavigation button{\n
display: inline;\n
border:0 none;\n
background-color:inherit;\n
vertical-align:middle;\n
cursor:pointer;\n
}\n
\n
.pageNavigation button.listbox_first_page .image,\n
.pageNavigation button.listbox_previous_page .image,\n
.pageNavigation button.listbox_next_page .image,\n
.pageNavigation button.listbox_last_page .image{\n
width:22px;\n
height:22px;\n
display:block;\n
background-color:transparent;\n
}\n
\n
.pageNavigation button.listbox_first_page .image{\n
background-image: url(\'images/2leftarrowv.png\');\n
}\n
\n
.pageNavigation button.listbox_previous_page .image{\n
background-image: url(\'images/1leftarrowv.png\');\n
}\n
\n
.pageNavigation button.listbox_next_page .image{\n
background-image: url(\'images/1rightarrowv.png\');\n
}\n
\n
.pageNavigation button.listbox_last_page .image{\n
background-image: url(\'images/2rightarrowv.png\');\n
}\n
\n
div.block div.list_style input {\n
margin-left:15px;\n
margin-top:5px;\n
}\n
\n
/* some css for the worklist gadget */\n
\n
/* \n
Gadgets CSS \n
\n
*/\n
\n
\n
/* Worklist Gadget */\n
div.block .right{\n
float:right;\n
margin-left:5px;\n
......@@ -552,6 +524,18 @@ div.block div.worklist_list ul li table.listbox thead td,div.block div.worklist_
div.block div.worklist_list ul li a:hover{\n
text-decoration:none;\n
}\n
\n
\n
div.document-gadget-quick-preview div.teaser{\n
cursor: pointer;\n
}\n
/* Rss Feed reader gadget needs no listbox headers or \n
show number of records or show \'No results\' as listbox title is used for this */\n
div.gadget-rss-reader table.listbox thead,\n
div.gadget-rss-reader div.listbox-number-of-records,\n
div.gadget-rss-reader table.listbox td.listbox-table-no-result-row{\n
display: none;\n
}\n
</string> </value>
</item>
<item>
......@@ -560,7 +544,7 @@ div.block div.worklist_list ul li a:hover{\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>9264</int> </value>
<value> <int>8826</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
......@@ -41,7 +38,7 @@
<link href="erp5_knowledge_box_web_3columns.css" \n
rel="stylesheet" \n
type="text/css" /> \n
type="text/css" />\n
<tal:block \n
tal:define="mode python: \'web_front\';\n
default_pad_group python: \'\';\n
......
544
\ No newline at end of file
545
\ 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