From 95e214d8b1a8509e3e47fff04e8e297420c2d6ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 27 May 2010 13:26:00 +0000 Subject: [PATCH] Change listbox trees to use getCompactTranslatedTitle and not getTranslatedTitleOrId, and to sort by int_index instead of id. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35680 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_km_theme/ListBox_asHTML.xml | 6 +++--- bt5/erp5_km/bt/revision | 2 +- .../portal_skins/erp5_mobile_ui/ListBox_asHTML.xml | 6 +++--- bt5/erp5_mobile/bt/revision | 2 +- .../portal_skins/erp5_xhtml_style/ListBox_asHTML.xml | 6 +++--- product/ERP5/bootstrap/erp5_xhtml_style/bt/revision | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml index 1985d1e554..423f823e72 100644 --- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml +++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml @@ -117,7 +117,7 @@ summary="This table contains the domain tree"\n class="listbox_domain_tree_table"\n tal:attributes="id string:${field_id}_domain_tree_table"\n - tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False);\n + tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False, sort_on=((\'int_index\', \'ASC\'),));\n total_depth python: max([report_tree.depth for report_tree in report_tree_list] + [-1])">\n <tr tal:repeat="report_tree report_tree_list">\n <tal:block tal:repeat="i python: range(report_tree.depth)">\n @@ -128,11 +128,11 @@ <a href="method" class="tree_open"\n tal:condition="report_tree/is_open"\n tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">\n - <b tal:content="report_tree/obj/getTranslatedTitleOrId">Domain</b></a>\n + <b tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</b></a>\n <a href="method" class="tree_closed"\n tal:condition="not: report_tree/is_open"\n tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">\n - <tal:block tal:content="report_tree/obj/getTranslatedTitleOrId">Domain</tal:block></a>\n + <tal:block tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</tal:block></a>\n </td>\n </tr>\n </table>\n diff --git a/bt5/erp5_km/bt/revision b/bt5/erp5_km/bt/revision index c6a6947194..5bb1b749c8 100644 --- a/bt5/erp5_km/bt/revision +++ b/bt5/erp5_km/bt/revision @@ -1 +1 @@ -1422 \ No newline at end of file +1423 \ No newline at end of file diff --git a/bt5/erp5_mobile/SkinTemplateItem/portal_skins/erp5_mobile_ui/ListBox_asHTML.xml b/bt5/erp5_mobile/SkinTemplateItem/portal_skins/erp5_mobile_ui/ListBox_asHTML.xml index eccd165a78..1284c9be3f 100644 --- a/bt5/erp5_mobile/SkinTemplateItem/portal_skins/erp5_mobile_ui/ListBox_asHTML.xml +++ b/bt5/erp5_mobile/SkinTemplateItem/portal_skins/erp5_mobile_ui/ListBox_asHTML.xml @@ -95,7 +95,7 @@ </select>\n <div id="listbox_domain_tree_table"\n tal:attributes="id string:${field_id}_domain_tree_table"\n - tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False);\n + tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False, sort_on=((\'int_index\', \'ASC\'),));\n total_depth python: max([report_tree.depth for report_tree in report_tree_list] + [-1])">\n <div tal:repeat="report_tree report_tree_list">\n <tal:block tal:repeat="i python: range(report_tree.depth)">\n @@ -105,10 +105,10 @@ tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n <a href="method"\n tal:condition="report_tree/is_open"\n - tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">- <b tal:content="report_tree/obj/getTitleOrId" i18n:translate="" i18n:domain="ui">Domain</b></a>\n + tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">- <b tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</b></a>\n <a href="method"\n tal:condition="not: report_tree/is_open"\n - tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">+ <tal:block tal:content="report_tree/obj/getTitleOrId" i18n:translate="" i18n:domain="ui">Domain</tal:block></a>\n + tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">+ <tal:block tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</tal:block></a>\n </div>\n </div>\n </div>\n diff --git a/bt5/erp5_mobile/bt/revision b/bt5/erp5_mobile/bt/revision index 4800c7da68..fc9afb48e0 100644 --- a/bt5/erp5_mobile/bt/revision +++ b/bt5/erp5_mobile/bt/revision @@ -1 +1 @@ -58 \ No newline at end of file +59 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml index aec26338f1..b691a8e041 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml @@ -113,7 +113,7 @@ summary="This table contains the domain tree"\n class="listbox_domain_tree_table"\n tal:attributes="id string:${field_id}_domain_tree_table"\n - tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False);\n + tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False, sort_on=((\'int_index\', \'ASC\'),));\n total_depth python: max([report_tree.depth for report_tree in report_tree_list] + [-1])">\n <tr tal:repeat="report_tree report_tree_list">\n <tal:block tal:repeat="i python: range(report_tree.depth)">\n @@ -124,11 +124,11 @@ <a href="method" class="tree_open"\n tal:condition="report_tree/is_open"\n tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">\n - <b tal:content="report_tree/obj/getTranslatedTitleOrId">Domain</b></a>\n + <b tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</b></a>\n <a href="method" class="tree_closed"\n tal:condition="not: report_tree/is_open"\n tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">\n - <tal:block tal:content="report_tree/obj/getTranslatedTitleOrId">Domain</tal:block></a>\n + <tal:block tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</tal:block></a>\n </td>\n </tr>\n </table>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 5a30e5affa..db8b695779 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -947 \ No newline at end of file +948 \ No newline at end of file -- 2.30.9