Commit 3838ba74 authored by Fabien Morin's avatar Fabien Morin

clean a bit css and template :

many css selector were used in listbox. Now there is 3 principals :
- class="listbox" for standard lisboxes (the selector to use is for exmample : table.listbox { background: green})
- class="listbox table" for table style (the selector to use is for exmample : table.listbox.table { background: red;})
- class="listbox search" for search style (the selector to use is for exmample : table.listbox.search { background: blue;})

remove tbody, thead and tfoot markup. Because this generate not xhtml valid code when there is nothing in the body. And body markup is mandatory if we want to display the
ad and tfoot. Now all this markup are replaced by <tr class="tbody"> <tr>

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26259 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 517a89cd
...@@ -228,9 +228,9 @@ tal:define=" listbox_max_lines python: int(here.getMaxLineNumber());\n ...@@ -228,9 +228,9 @@ tal:define=" listbox_max_lines python: int(here.getMaxLineNumber());\n
tal:condition="is_web_mode">\n tal:condition="is_web_mode">\n
<tal:block tal:define="global website python: real_context.getWebSiteValue()" />\n <tal:block tal:define="global website python: real_context.getWebSiteValue()" />\n
</tal:block>\n </tal:block>\n
<table cellpadding="0" cellspacing="0" class="documentList">\n <table cellpadding="0" cellspacing="0" class="listbox search">\n
<tal:block tal:repeat="line line_list">\n <tal:block tal:repeat="line line_list">\n
<tr tal:define="css python: test(repeat[\'line\'].index % 2, \'even\', \'odd\');\n <tr tal:define="css python: test(repeat[\'line\'].index % 2, \'DataB\', \'DataA\');\n
obj line/getObject;\n obj line/getObject;\n
url obj/absolute_url;\n url obj/absolute_url;\n
is_document python: obj.getPortalType() in\n is_document python: obj.getPortalType() in\n
...@@ -238,7 +238,7 @@ tal:define=" listbox_max_lines python: int(here.getMaxLineNumber());\n ...@@ -238,7 +238,7 @@ tal:define=" listbox_max_lines python: int(here.getMaxLineNumber());\n
hidden_pop_dom_id string:dom_popup_${field_id}_${repeat/line/index};\n hidden_pop_dom_id string:dom_popup_${field_id}_${repeat/line/index};\n
details_dom_id string:${field_id}_search_details_${repeat/line/index};"\n details_dom_id string:${field_id}_search_details_${repeat/line/index};"\n
tal:attributes="id string:${field_id}_data_line_${repeat/line/index}; \n tal:attributes="id string:${field_id}_data_line_${repeat/line/index}; \n
class css;">\n class python: \'%s tbody\' % css;">\n
\n \n
<td class="icon">\n <td class="icon">\n
<a tal:condition="is_document"\n <a tal:condition="is_document"\n
......
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tr>\n </tr>\n
</table>\n </table>\n
</div>\n </div>\n
<div class="ListContent">\n <div class="listbox">\n
<table cellpadding="0" cellspacing="0"\n <table cellpadding="0" cellspacing="0"\n
summary="This table contains the listbox content">\n summary="This table contains the listbox content">\n
<tr id="listbox_label_line" class="listbox_label_line"\n <tr id="listbox_label_line" class="listbox_label_line"\n
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
\n \n
<input tal:condition="python:is_gadget_mode" type="hidden" name="dom_id" tal:attributes="value dom_id" />\n <input tal:condition="python:is_gadget_mode" type="hidden" name="dom_id" tal:attributes="value dom_id" />\n
\n \n
<table class="listbox">\n <table class="listbox table">\n
\n \n
<caption>\n <caption>\n
<span class="left">\n <span class="left">\n
...@@ -210,8 +210,7 @@ ...@@ -210,8 +210,7 @@
</span>\n </span>\n
</caption>\n </caption>\n
\n \n
<thead>\n <tr class ="thead">\n
<tr>\n
<td tal:condition="python:not is_gadget_mode and show_select_column"\n <td tal:condition="python:not is_gadget_mode and show_select_column"\n
class="Data" style="width: 50px; text-align: center; vertical-align: middle;float:left;">\n class="Data" style="width: 50px; text-align: center; vertical-align: middle;float:left;">\n
<input id="listbox_check_all" type="image"\n <input id="listbox_check_all" type="image"\n
...@@ -270,7 +269,7 @@ ...@@ -270,7 +269,7 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tr>\n </tr>\n
<tr tal:condition="show_search_line">\n <tr class="thead" tal:condition="show_search_line">\n
<td tal:condition="python: show_select_column and show_search_line and not is_gadget_mode"\n <td tal:condition="python: show_select_column and show_search_line and not is_gadget_mode"\n
class="Data" style="width: 50px; text-align: center; vertical-align: middle">\n class="Data" style="width: 50px; text-align: center; vertical-align: middle">\n
<input id="listbox_select" type="image" src="exec16.png"\n <input id="listbox_select" type="image" src="exec16.png"\n
...@@ -304,13 +303,13 @@ ...@@ -304,13 +303,13 @@
</tal:block>\n </tal:block>\n
</td>\n </td>\n
</tr>\n </tr>\n
</thead>\n
\n \n
<tal:replace tal:content="nothing">\n <tal:replace tal:content="nothing">\n
TODO: Move pagination pre-calcultion higher in that code.\n TODO: Move pagination pre-calcultion higher in that code.\n
</tal:replace>\n </tal:replace>\n
<tfoot tal:condition="python: int(here.total_size) > int(here.getMaxLineNumber())">\n <tr tal:condition="python: int(here.total_size) > int(here.getMaxLineNumber())"\n
<tr tal:define="max_lines python: here.getMaxLineNumber();\n class="tfoot"\n
tal:define="max_lines python: here.getMaxLineNumber();\n
total_page python: here.total_pages;\n total_page python: here.total_pages;\n
page_id python: here.current_page;\n page_id python: here.current_page;\n
current_page python: page_id + 1;\n current_page python: page_id + 1;\n
...@@ -404,10 +403,9 @@ ...@@ -404,10 +403,9 @@
</tal:block>\n </tal:block>\n
</td>\n </td>\n
</tr>\n </tr>\n
</tfoot>\n
\n \n
<tbody tal:condition="line_list">\n <tr class="tbody" tal:condition="line_list"\n
<tr tal:repeat="line line_list" tal:define="checked_uid_set here/getCheckedUidSet">\n tal:repeat="line line_list" tal:define="checked_uid_set here/getCheckedUidSet">\n
<td tal:condition="python: show_select_column and not is_gadget_mode"\n <td tal:condition="python: show_select_column and not is_gadget_mode"\n
class="DataA" style="width: 50px; text-align: center; vertical-align: middle"\n class="DataA" style="width: 50px; text-align: center; vertical-align: middle"\n
>\n >\n
...@@ -436,7 +434,6 @@ ...@@ -436,7 +434,6 @@
</td>\n </td>\n
</tal:block>\n </tal:block>\n
</tr>\n </tr>\n
</tbody>\n
\n \n
</table>\n </table>\n
\n \n
......
...@@ -1134,14 +1134,14 @@ a.tree_closed {\n ...@@ -1134,14 +1134,14 @@ a.tree_closed {\n
background-repeat: no-repeat;\n background-repeat: no-repeat;\n
}\n }\n
\n \n
.ListContent {\n .listbox {\n
color: #000;\n color: #000;\n
background-color: <dtml-var document_background_color>;\n background-color: <dtml-var document_background_color>;\n
padding-left: 1px;\n padding-left: 1px;\n
}\n }\n
\n \n
.ListContent table,\n .listbox table,\n
table.listbox {\n table.listbox.table {\n
width: 100%;\n width: 100%;\n
border-collapse: collapse;\n border-collapse: collapse;\n
border-color: <dtml-var document_border_color>;\n border-color: <dtml-var document_border_color>;\n
...@@ -1152,33 +1152,33 @@ table.listbox {\n ...@@ -1152,33 +1152,33 @@ table.listbox {\n
border-right-width: 1px;\n border-right-width: 1px;\n
}\n }\n
\n \n
.ListContent .listbox_label_line td.Data {\n .listbox .listbox_label_line td.Data {\n
border-top-width: 1px;\n border-top-width: 1px;\n
}\n }\n
\n \n
.ListContent .listbox_label_line {\n .listbox .listbox_label_line {\n
color: <dtml-var font_color>;\n color: <dtml-var font_color>;\n
background-color: <dtml-var listbox_label_background_color>;\n background-color: <dtml-var listbox_label_background_color>;\n
/* font-size: 90%; */\n /* font-size: 90%; */\n
}\n }\n
\n \n
.ListContent .listbox_stat_line {\n .listbox .listbox_stat_line {\n
color: inherit;\n color: inherit;\n
background-color: <dtml-var listbox_stat_background_color>;\n background-color: <dtml-var listbox_stat_background_color>;\n
}\n }\n
\n \n
.ListContent .listbox_stat_line td.Data {\n .listbox .listbox_stat_line td.Data {\n
border-top-width: 1px;\n border-top-width: 1px;\n
border-top-style: solid;\n border-top-style: solid;\n
border-color: <dtml-var document_border_color>;\n border-color: <dtml-var document_border_color>;\n
}\n }\n
\n \n
.ListContent tr.DataA {\n .listbox tr.DataA {\n
color: inherit;\n color: inherit;\n
background-color: <dtml-var listbox_odd_background_color>;\n background-color: <dtml-var listbox_odd_background_color>;\n
}\n }\n
\n \n
.ListContent tr.DataB {\n .listbox tr.DataB {\n
color: inherit;\n color: inherit;\n
background-color: <dtml-var listbox_even_background_color>;\n background-color: <dtml-var listbox_even_background_color>;\n
}\n }\n
...@@ -1189,14 +1189,14 @@ table.listbox {\n ...@@ -1189,14 +1189,14 @@ table.listbox {\n
vertical-align: middle;\n vertical-align: middle;\n
}\n }\n
\n \n
.ListContent tr.DataA:hover,\n .listbox tr.DataA:hover,\n
.ListContent tr.DataB:hover, \n .listbox tr.DataB:hover, \n
table.listbox tbody tr:hover{\n table.listbox.table tr.tbody:hover{\n
color: inherit;\n color: inherit;\n
background-color: <dtml-var listbox_hover_background_color>;\n background-color: <dtml-var listbox_hover_background_color>;\n
}\n }\n
\n \n
.ListContent td {\n .listbox td {\n
border-color: <dtml-var document_border_color>;\n border-color: <dtml-var document_border_color>;\n
border-style: solid;\n border-style: solid;\n
border-top-width: 0;\n border-top-width: 0;\n
...@@ -1207,9 +1207,48 @@ table.listbox tbody tr:hover{\n ...@@ -1207,9 +1207,48 @@ table.listbox tbody tr:hover{\n
padding-right: 1px;\n padding-right: 1px;\n
}\n }\n
\n \n
.ListContent .error {\n .listbox .error {\n
color: #F00;\n color: #F00;\n
}\n }\n
\n
table.listbox {\n
width: 100%;\n
margin-bottom: 1em;\n
border-style: solid;\n
border-width: 0 1px 1px 1px;\n
border-color:<dtml-var document_border_color>;\n
}\n
\n
table.listbox .thead {background: #e6e6e6}\n
\n
table.listbox .thead th,\n
table.listbox a {\n
font-weight: normal\n
}\n
\n
table.listbox td,\n
table.listbox th {\n
text-align: left;\n
padding: .3em;\n
border: 1px solid <dtml-var document_border_color>;\n
}\n
\n
table.listbox tr.tbody:hover {background:<dtml-var listbox_hover_background_color>}\n
\n
table.listbox .tbody td.icon {\n
text-align: center;\n
padding: 0;\n
}\n
\n
table.listbox .tbody td.icon a {\n
display: block;\n
padding: .3em;\n
}\n
\n
table.listbox tr.tbody td div.coordinates a {\n
color:green;\n
}\n
\n
td.AnchorColumn {\n td.AnchorColumn {\n
!important\n !important\n
border-style:none;\n border-style:none;\n
...@@ -1252,49 +1291,6 @@ div.searchResultHeader {\n ...@@ -1252,49 +1291,6 @@ div.searchResultHeader {\n
div.searchResultHeader .right {float: right}\n div.searchResultHeader .right {float: right}\n
div.searchResultHeader .left {float: left}\n div.searchResultHeader .left {float: left}\n
\n \n
/* Document list\n
------------------------------------------------*/\n
table.documentList {\n
width: 100%;\n
margin-bottom: 1em;\n
border-style: solid;\n
border-width: 0 1px 1px 1px;\n
border-color:<dtml-var document_border_color>;\n
}\n
\n
table.documentList thead {background: #e6e6e6}\n
\n
table.documentList thead th,\n
table.documentList a {\n
font-weight: normal\n
}\n
\n
table.documentList td,\n
table.documentList th {\n
text-align: left;\n
padding: .3em;\n
border: 1px solid <dtml-var document_border_color>;\n
}\n
\n
table.documentList tbody tr.even {background: <dtml-var listbox_even_background_color>;}\n
table.documentList tbody tr.odd {background: <dtml-var listbox_odd_background_color>;}\n
\n
table.documentList tbody tr:hover {background:<dtml-var listbox_hover_background_color>}\n
\n
table.documentList tbody td.icon {\n
text-align: center;\n
padding: 0;\n
}\n
\n
table.documentList tbody td.icon a {\n
display: block;\n
padding: .3em;\n
}\n
\n
table.documentList tbody tr td div.coordinates a {\n
color:green;\n
}\n
\n
\n \n
/* Search results list\n /* Search results list\n
------------------------------------------------*/\n ------------------------------------------------*/\n
...@@ -1354,21 +1350,21 @@ div.search.result .resultList .search_result_portal_type:after {\n ...@@ -1354,21 +1350,21 @@ div.search.result .resultList .search_result_portal_type:after {\n
content: "]";\n content: "]";\n
}\n }\n
\n \n
div.search.result .resultList table.documentList caption {\n div.search.result .resultList table.listbox caption {\n
font-weight: bold;\n font-weight: bold;\n
text-align: left;\n text-align: left;\n
}\n }\n
\n \n
div.search.result .resultList table.documentList td {\n div.search.result .resultList table.listbox td {\n
vertical-align: middle;\n vertical-align: middle;\n
border: transparent;\n border: transparent;\n
margin:0;\n margin:0;\n
}\n }\n
\n \n
div.search.result .resultList table.documentList td ul {list-style: none}\n div.search.result .resultList table.listbox td ul {list-style: none}\n
div.search.result .resultList table.documentList td ul li {margin: 0}\n div.search.result .resultList table.listbox td ul li {margin: 0}\n
\n \n
div.search.result .resultList table.documentList td blockquote {\n div.search.result .resultList table.listbox td blockquote {\n
border: 1px solid #e6e2e6;\n border: 1px solid #e6e2e6;\n
border-top-color: #000;\n border-top-color: #000;\n
margin: .5em 0 2em;\n margin: .5em 0 2em;\n
...@@ -1389,7 +1385,7 @@ div.search.result div.searchBar {\n ...@@ -1389,7 +1385,7 @@ div.search.result div.searchBar {\n
}\n }\n
\n \n
div.searchResultHeader #style_toggle_icon,\n div.searchResultHeader #style_toggle_icon,\n
table.listbox #style_toggle_icon {\n table.listbox.table #style_toggle_icon {\n
padding:0;\n padding:0;\n
border: 0px;\n border: 0px;\n
border-color:red;\n border-color:red;\n
......
685 686
\ 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