Commit a606ba53 authored by Ivan Tyagov's avatar Ivan Tyagov

Use unified listbox rather than a dedicated listbox PT renderer for "Latest content" gadget.

Apply CSS convention.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38440 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e21bbded
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="File" module="OFS.Image"/>
<global name="File" module="OFS.Image"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -15,7 +12,7 @@ ...@@ -15,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts78677337.18</string> </value> <value> <string>ts84711123.89</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -388,6 +385,42 @@ div.relations-gadget ul{\n ...@@ -388,6 +385,42 @@ div.relations-gadget ul{\n
margin-left:0.5em;\n margin-left:0.5em;\n
}\n }\n
\n \n
/* Latest content needs no listbox headers*/\n
div.gadget-latest-documents div.listbox-head,\n
div.gadget-latest-documents table.listbox thead{\n
display: none;\n
}\n
\n
/* My Documents gadget needs no listbox headers*/\n
div.gadget-my-documents div.listbox-head,\n
div.gadget-my-documents table.listbox thead{\n
display: none;\n
}\n
\n
/* Some gadgets share same Document_getSummaryAsHTML */\n
div.document-gadget-quick-preview div.teaser{\n
cursor: pointer;\n
}\n
\n
div.document-gadget-quick-preview span.document-title,\n
div.document-gadget-quick-preview span.modification-date{\n
font-size:0.8em;\n
}\n
\n
div.document-gadget-quick-preview span.document-title{\n
color:#969696;\n
}\n
\n
div.document-gadget-quick-preview span.modification-date{\n
color: #C0C0C0;\n
}\n
\n
div.document-gadget-quick-preview a.document-link{\n
color:#000;\n
font-weight:bold;\n
}\n
\n
\n
/* Gadget admin toolbox (deprecated)*/\n /* Gadget admin toolbox (deprecated)*/\n
.gadget .adminToolbox > label{\n .gadget .adminToolbox > label{\n
\n \n
...@@ -504,7 +537,7 @@ div.block div.adminToolbox .inner label{\n ...@@ -504,7 +537,7 @@ div.block div.adminToolbox .inner label{\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>8205</int> </value> <value> <int>9025</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -102,44 +99,8 @@ ...@@ -102,44 +99,8 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>reference</string> <string>getSummaryAsHTML</string>
<string>Reference</string> <string>Summary</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>Type</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>field_title</string>
<string>title</string>
</tuple>
<tuple>
<string>field_date</string>
<string>date</string>
</tuple>
<tuple>
<string>field_content</string>
<string>content</string>
</tuple>
<tuple>
<string>field_img</string>
<string>thumbnail</string>
</tuple>
<tuple>
<string>field_link</string>
<string>link</string>
</tuple>
<tuple>
<string>field_others_links</string>
<string>others_links</string>
</tuple>
<tuple>
<string>field_md5</string>
<string>md5</string>
</tuple> </tuple>
</list> </list>
</value> </value>
...@@ -169,40 +130,8 @@ ...@@ -169,40 +130,8 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>creation_date</string> <string>getSummaryAsHTML</string>
<string>Creation Date</string> <string>Summary</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
<tuple>
<string>field_img</string>
<string>field_img</string>
</tuple>
<tuple>
<string>field_content</string>
<string>field_content</string>
</tuple>
<tuple>
<string>field_title</string>
<string>field_title</string>
</tuple>
<tuple>
<string>field_link</string>
<string>field_link</string>
</tuple>
<tuple>
<string>field_md5</string>
<string>field_md5</string>
</tuple>
<tuple>
<string>field_others_links</string>
<string>field_others_links</string>
</tuple>
<tuple>
<string>field_date</string>
<string>field_date</string>
</tuple> </tuple>
</list> </list>
</value> </value>
...@@ -231,7 +160,7 @@ ...@@ -231,7 +160,7 @@
</item> </item>
<item> <item>
<key> <string>page_template</string> </key> <key> <string>page_template</string> </key>
<value> <string>ListBox_asListStyleHTML</string> </value> <value> <string>ListBox_asHTML</string> </value>
</item> </item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
...@@ -240,16 +169,7 @@ ...@@ -240,16 +169,7 @@
<item> <item>
<key> <string>search_columns</string> </key> <key> <string>search_columns</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>Type</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -263,24 +183,7 @@ ...@@ -263,24 +183,7 @@
<item> <item>
<key> <string>sort_columns</string> </key> <key> <string>sort_columns</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>Validation State</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>Type</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Date</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -296,11 +199,7 @@ ...@@ -296,11 +199,7 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>field_date</string> <string>getSummaryAsHTML</string>
<string></string>
</tuple>
<tuple>
<string>field_img</string>
<string></string> <string></string>
</tuple> </tuple>
</list> </list>
...@@ -314,10 +213,7 @@ ...@@ -314,10 +213,7 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="Method" module="Products.Formulator.MethodField"/>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -330,10 +226,7 @@ ...@@ -330,10 +226,7 @@
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <global name="Method" module="Products.Formulator.MethodField"/>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
......
...@@ -2,16 +2,13 @@ ...@@ -2,16 +2,13 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="EditorField" module="Products.ERP5Form.EditorField"/>
<global name="EditorField" module="Products.ERP5Form.EditorField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_rss_link</string> </value> <value> <string>listbox_getSummaryAsHTML</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -218,7 +215,7 @@ ...@@ -218,7 +215,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>hiddenLabel rss-link</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -274,7 +271,7 @@ ...@@ -274,7 +271,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>RSS</string> </value> <value> <string>Summary</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -296,20 +293,13 @@ ...@@ -296,20 +293,13 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: cell.Document_getSummaryAsHTML()</string> </value>
python: \'\'\'<a href="%s/WebSection_viewContentListAsRSS?box_relative_url=%s"><img alt="RSS" src="km_img/download_rss.png"/></a>\'\'\' %(request.get(\'current_web_section\', here).absolute_url(), request[\'box_relative_url\'])
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>date_only</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_modification_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>date_only</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
1542 1544
\ No newline at end of file \ No newline at end of file
<?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 \n
tal:define="document_url here/absolute_url;\n
thumbnail_url here/Base_getThumbnailAbsoluteUrl;\n
display string:thumbnail;\n
icon here/getIcon;\n
title here/getTitle;\n
modification_date python: here.getModificationDate();\n
format python: here.getObject().portal_preferences.getPreference(\'preferred_image_format\', \'png\');\n
description python: here.getDescription();\n
box_relative_url python: request.get(\'box_relative_url\', \'\');\n
dom_id python: (\'%s-%s\' %(box_relative_url, here.getRelativeUrl()))">\n
<div class="document-gadget-quick-preview">\n
<div class="teaser"\n
tal:attributes="onclick string:toggle(\'${dom_id}\');">\n
<img alt="Icon" class="icon"\n
tal:attributes="src icon" />\n
\n
<span alt="Link" class="document-title"\n
tal:content="title"/>\n
\n
<span class="modification-date"\n
tal:content="modification_date"/>\n
\n
</div>\n
\n
<!-- Hidden thumbnail & description -->\n
<div class="body" style="display:none;"\n
tal:attributes="id dom_id">\n
<a target="_blank" \n
tal:attributes="href string:${document_url}/view">\n
<img alt="Thumbnail" class="document-thumbnail"\n
tal:condition="python: thumbnail_url is not None"\n
tal:attributes="src string:${thumbnail_url}/index_html?display=${display}&format=${format}"/>\n
<br/>\n
<span class="description"\n
tal:content="description"/>\n
</a>\n
<br/>\n
<a target="_blank" \n
class="document-link"\n
alt="Original Document"\n
i18n:translate="" i18n:domain="ui" i18n:attributes="alt"\n
tal:attributes="href string:${document_url}/view">Show original item</a>\n
</div>\n
</div>\n
\n
</tal:block>\n
]]></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document_getSummaryAsHTML</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ERP5Form" module="Products.ERP5Form.Form"/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -76,7 +73,6 @@ ...@@ -76,7 +73,6 @@
<value> <value>
<list> <list>
<string>listbox</string> <string>listbox</string>
<string>listbox_modification_date</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -84,14 +80,7 @@ ...@@ -84,14 +80,7 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list>
<string>your_rss_link</string> <string>listbox_getSummaryAsHTML</string>
<string>listbox_field_title</string>
<string>listbox_field_link</string>
<string>listbox_field_md5</string>
<string>listbox_field_others_links</string>
<string>listbox_field_img</string>
<string>listbox_field_content</string>
<string>listbox_field_date</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -2,16 +2,13 @@ ...@@ -2,16 +2,13 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="EditorField" module="Products.ERP5Form.EditorField"/>
<global name="EditorField" module="Products.ERP5Form.EditorField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_field_content</string> </value> <value> <string>listbox_getSummaryAsHTML</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -274,7 +271,7 @@ ...@@ -274,7 +271,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_field_content</string> </value> <value> <string>Summary</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -286,7 +283,7 @@ ...@@ -286,7 +283,7 @@
</item> </item>
<item> <item>
<key> <string>width</string> </key> <key> <string>width</string> </key>
<value> <int>20</int> </value> <value> <int>40</int> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -296,20 +293,13 @@ ...@@ -296,20 +293,13 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: cell.Document_getSummaryAsHTML()</string> </value>
python: \'<div><a href= "%s/view"><img class="left" src="%s?display=thumbnail&format=%s&" /><span style="font-size: normal">%s</span></a></div><p class="clear" />\' % (cell.absolute_url(), cell.Base_getThumbnailAbsoluteUrl(), cell.getObject().portal_preferences.getPreference(\'preferred_image_format\', \'png\'), cell.getDescription())
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
972 973
\ 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