Commit e5c1b163 authored by Ivan Tyagov's avatar Ivan Tyagov

Make sort buttons work in gadget mode as well.

CSS cleanup & generalization.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37370 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2a7a4db3
...@@ -137,11 +137,11 @@ ...@@ -137,11 +137,11 @@
<td colspan="1" \n <td colspan="1" \n
class="listbox-table-domain-tree-cell"\n class="listbox-table-domain-tree-cell"\n
tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n
<a href="method" class="tree_open selected"\n <a href="method" class="tree-open selected"\n
tal:condition="report_tree/is_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 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
tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n
<a href="method" class="tree_closed"\n <a href="method" class="tree-closed"\n
tal:condition="not: report_tree/is_open"\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: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:content="report_tree/obj/getCompactTranslatedTitle"/>\n tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n
...@@ -218,32 +218,29 @@ ...@@ -218,32 +218,29 @@
title python: value[1];\n title python: value[1];\n
sort_order python: value[2]">\n sort_order python: value[2]">\n
\n \n
<th tal:condition="sql" class="listbox-table-header-cell"> \n <th tal:condition="sql" class="listbox-table-header-cell"\n
tal:define="bt_class python: sort_order==\'ascending\' and \'sort-button sort-button-asc\' \n
or sort_order == \'descending\' and \'sort-button sort-button-desc\' \n
or \'sort-button\'"> \n
<!-- Button in normal view -->\n <!-- Button in normal view -->\n
<button tal:define="\n <button tal:condition="not:is_gadget_mode" \n
bt_class python: sort_order==\'ascending\' and \'sort_button sort_button_asc\' \n type="submit"\n
or sort_order == \'descending\' and \'sort_button sort_button_desc\' \n name="setSelectionQuickSortOrder:method"\n
or \'sort_button\'"\n tal:content="title"\n
tal:condition="not:is_gadget_mode" \n tal:attributes="title string:${title}; \n
type="submit"\n value string:${field_id}.${sql};\n
name="setSelectionQuickSortOrder:method"\n class bt_class;"\n
tal:attributes="title string:${title}; \n i18n:domain="ui" i18n:attributes="title" />\n
value string:${field_id}.${sql};\n
class bt_class;"\n
i18n:domain="ui" i18n:attributes="title">\n
<span tal:content="title" i18n:domain="ui" i18n:translate=""/>\n
</button>\n
\n \n
<!-- Button in gadget mode -->\n <!-- Button in gadget mode -->\n
<button tal:condition="is_gadget_mode" \n <button tal:condition="is_gadget_mode" \n
tal:define ="params python: {\'setSelectionQuickSortOrder:method\':field_id+\'.\'+sql};"\n tal:define ="params python: {\'setSelectionQuickSortOrder:method\':field_id+\'.\'+sql};"\n
type="button" \n type="button" \n
class="sort_button"\n tal:content="title"\n
tal:attributes="title string:${title}; \n tal:attributes="title string:${title}; \n
onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
i18n:domain="ui" i18n:attributes="title">\n class bt_class;"\n
<span tal:content="title" i18n:domain="ui" i18n:translate=""/>\n i18n:domain="ui" i18n:attributes="title"/>\n
</button>\n
</th>\n </th>\n
\n \n
<th class="listbox-table-header-cell"\n <th class="listbox-table-header-cell"\n
...@@ -346,7 +343,7 @@ ...@@ -346,7 +343,7 @@
<a tal:condition="section_name"\n <a tal:condition="section_name"\n
tal:define="method_id python: line.isOpen() and \'foldReport\' or \'unfoldReport\'"\n tal:define="method_id python: line.isOpen() and \'foldReport\' or \'unfoldReport\'"\n
tal:attributes="href string:${method_id}?report_url=${line/getDomainUrl}&amp;form_id=${form_id}&amp;list_selection_name=${selection_name};\n tal:attributes="href string:${method_id}?report_url=${line/getDomainUrl}&amp;form_id=${form_id}&amp;list_selection_name=${selection_name};\n
class python:test(line.isOpen(), \'tree_open\', \'tree_closed\');\n class python:test(line.isOpen(), \'tree-open\', \'tree-closed\');\n
style python:\'white-space: nowrap;; margin-left: %spx\' % (line.getDepth() * 15)"\n style python:\'white-space: nowrap;; margin-left: %spx\' % (line.getDepth() * 15)"\n
tal:content="section_name"/>\n tal:content="section_name"/>\n
</td>\n </td>\n
......
...@@ -153,7 +153,6 @@ div.search_popup{\n ...@@ -153,7 +153,6 @@ div.search_popup{\n
position:relative;\n position:relative;\n
}\n }\n
\n \n
\n
/*Define all button image*/\n /*Define all button image*/\n
<tal:block tal:define="buttons python: [\'cut\',\'copy\',\'paste\',\'delete\',\'print\',\'new\',\'reset\',\'filter\',\'find\',\'sort\',\'config\']">\n <tal:block tal:define="buttons python: [\'cut\',\'copy\',\'paste\',\'delete\',\'print\',\'new\',\'reset\',\'filter\',\'find\',\'sort\',\'config\']">\n
<tal:block tal:repeat ="button buttons">\n <tal:block tal:repeat ="button buttons">\n
...@@ -167,7 +166,7 @@ div.search_popup{\n ...@@ -167,7 +166,7 @@ div.search_popup{\n
\n \n
\n \n
/*********************/\n /*********************/\n
/* Listbox style */\n /* Listbox style (XXX: move to erp5.css) */\n
/*********************/\n /*********************/\n
div.listbox-container{\n div.listbox-container{\n
width: 100%;\n width: 100%;\n
...@@ -194,7 +193,6 @@ div.listbox-body{\n ...@@ -194,7 +193,6 @@ div.listbox-body{\n
width:auto;\n width:auto;\n
}\n }\n
\n \n
/* List mode selection*/\n
div.listbox-tree-mode-selection{\n div.listbox-tree-mode-selection{\n
height: 22px;\n height: 22px;\n
width: auto;\n width: auto;\n
...@@ -205,18 +203,10 @@ div.listbox-tree-mode-selection input{\n ...@@ -205,18 +203,10 @@ div.listbox-tree-mode-selection input{\n
width: auto;\n width: auto;\n
}\n }\n
\n \n
\n
th.listbox-table-report-tree-selection-cell{\n th.listbox-table-report-tree-selection-cell{\n
width: 50px; \n width: 50px; \n
}\n }\n
\n \n
td.listbox-table-domain-tree-cell{\n
text-align: left; \n
vertical-align: top; \n
white-space: nowrap;\n
}\n
\n
/*Footer block*/\n
div.listbox-footer{\n div.listbox-footer{\n
background-color:#F0EFE9;\n background-color:#F0EFE9;\n
float:left;\n float:left;\n
...@@ -280,14 +270,6 @@ div.listbox-full-text-search input.button{\n ...@@ -280,14 +270,6 @@ div.listbox-full-text-search input.button{\n
width: auto;\n width: auto;\n
}\n }\n
\n \n
div.resultList{\n
float:left;\n
}\n
div.searchResultHeader{\n
float:left;\n
}\n
\n
\n
/* Pagination*/\n /* Pagination*/\n
div.listbox-page-navigation{\n div.listbox-page-navigation{\n
width:auto;\n width:auto;\n
...@@ -300,12 +282,12 @@ div.listbox-page-navigation input{\n ...@@ -300,12 +282,12 @@ div.listbox-page-navigation input{\n
}\n }\n
\n \n
/* Report tree */\n /* Report tree */\n
a.tree_closed {\n a.tree-closed {\n
background:transparent url(\'./images/tree_closed.png\') no-repeat scroll left center;\n background:transparent url(\'./images/tree_closed.png\') no-repeat scroll left center;\n
padding-left:15px;\n padding-left:15px;\n
}\n }\n
\n \n
a.tree_open {\n a.tree-open {\n
background:transparent url(\'./images/tree_open.png\') no-repeat scroll left center;\n background:transparent url(\'./images/tree_open.png\') no-repeat scroll left center;\n
padding-left:15px;\n padding-left:15px;\n
}\n }\n
...@@ -313,29 +295,50 @@ a.tree_open {\n ...@@ -313,29 +295,50 @@ a.tree_open {\n
div.listbox-tree select{\n div.listbox-tree select{\n
max-width:120px;\n max-width:120px;\n
}\n }\n
\n
/*Table Listbox elements */\n /*Table Listbox elements */\n
.listbox th {\n table.listbox{\n
border-collapse:collapse;\n
width:100%;\n
}\n
\n
table.listbox th,\n
table.listbox td {\n
text-align:left;\n text-align:left;\n
vertical-align: top;\n vertical-align: top;\n
}\n }\n
.listbox-search-line, .listbox-label-line{\n
background-color: #F0EFE9;\n
}\n
.listbox-search-line th{\n
background-color: inherit;\n
}\n
\n \n
.listbox select {\n table.listbox th button{\n
max-width: 145px;\n border-width:0;\n
cursor:pointer;\n
float:left;\n
font-weight:bold;\n
padding:0 6px 0 0;\n
}\n }\n
\n \n
button.sort_button_desc{\n /* KM specific */\n
table.listbox th button.sort-button {\n
background:transparent url("../km_img/switch.png") no-repeat scroll 100% 50%;\n
}\n
table.listbox th button.sort-button:hover{\n
color: #FFF;\n
}\n
table.listbox th button.sort-button-desc{\n
background-image: url(\'./km_img/switch_desc.png\');\n background-image: url(\'./km_img/switch_desc.png\');\n
}\n }\n
button.sort_button_asc{\n table.listbox th button.sort-button-asc{\n
background-image: url(\'./km_img/switch_asc.png\');\n background-image: url(\'./km_img/switch_asc.png\');\n
}\n }\n
\n \n
/* KM specific */\n
.listbox-search-line, .listbox-label-line{\n
background-color: #F0EFE9;\n
}\n
\n
.listbox-search-line th{\n
background-color: inherit;\n
}\n
\n
/* in search mode listbox may contain top/ bottom quick search inputs */\n /* in search mode listbox may contain top/ bottom quick search inputs */\n
div.search-text-listbox{\n div.search-text-listbox{\n
text-align: center;\n text-align: center;\n
...@@ -344,10 +347,10 @@ div.search-text-listbox{\n ...@@ -344,10 +347,10 @@ div.search-text-listbox{\n
margin-bottom:0.5em;\n margin-bottom:0.5em;\n
margin-top:0.5em;\n margin-top:0.5em;\n
}\n }\n
\n
div.search-text-listbox input{\n div.search-text-listbox input{\n
width: auto;\n width: auto;\n
}\n }
]]></string> </value> ]]></string> </value>
</item> </item>
......
1503 1505
\ 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