Commit f56d4f4e authored by Kevin Deldycke's avatar Kevin Deldycke

Make column filter box working.

Support pagination of listboxes with custom parameters.
Auto-reset listbox when page or selection change.
WebStyleHTML listboxes return document list, not search results.
Reduce filter input box size.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8662 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 109ed084
...@@ -74,6 +74,14 @@ ...@@ -74,6 +74,14 @@
<!-- ListBox starts here -->\n <!-- ListBox starts here -->\n
<input type="hidden" name="list_selection_name" value="default" tal:attributes="value selection_name" />\n <input type="hidden" name="list_selection_name" value="default" tal:attributes="value selection_name" />\n
<input tal:condition="md5_string" type="hidden" name="md5_object_uid_list" value="checksum" tal:attributes="value md5_string" />\n <input tal:condition="md5_string" type="hidden" name="md5_object_uid_list" value="checksum" tal:attributes="value md5_string" />\n
\n
<input type="hidden" name="form_id" tal:attributes="value form_id" tal:condition="form_id"/>\n
<input type="hidden" name="selection_name" tal:attributes="value selection_name" tal:condition="selection_name"/>\n
<input type="hidden" name="selection_index" tal:attributes="value selection_index" tal:condition="selection_index"/>\n
<input type="hidden" name="reset" value="1"/>\n
<input id="listbox_select" tal:attributes="id string: ${field_id}_select"\n
title="Filter" alt="Filter" name="Base_doSelect:method"\n
type="submit" style="visibility: hidden"/>\n
\n \n
<tal:replace tal:content="nothing">\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 Because TAL cannot accept unbalanced tags, the support for a domain tree is realized by a macro.\n
...@@ -107,7 +115,7 @@ ...@@ -107,7 +115,7 @@
current_page_max python: listbox_max_lines * current_page;\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_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 current_page_stop python: (total_line < current_page_max) and total_line or current_page_max;">\n
<tal:block condition="python: total_line > 0">Resultats <em tal:content="current_page_start"/> - <em tal:content="current_page_stop"/> sur un total de <em tal:content="total_line"/>.</tal:block>\n <tal:block condition="python: total_line > 0">Documents <em tal:content="current_page_start"/> - <em tal:content="current_page_stop"/> sur un total de <em tal:content="total_line"/>.</tal:block>\n
<span tal:condition="python: total_line == 0" class="warning">No result !</span>\n <span tal:condition="python: total_line == 0" class="warning">No result !</span>\n
</span>\n </span>\n
</div>\n </div>\n
...@@ -137,14 +145,6 @@ ...@@ -137,14 +145,6 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tr>\n </tr>\n
\n
\n
\n
\n
\n
\n
\n
\n
<tr tal:condition="show_search_line">\n <tr tal:condition="show_search_line">\n
<td tal:repeat="value here/getSearchValueList">\n <td tal:repeat="value here/getSearchValueList">\n
<tal:block tal:define="alias python: value[0];\n <tal:block tal:define="alias python: value[0];\n
...@@ -154,28 +154,23 @@ ...@@ -154,28 +154,23 @@
<tal:block\n <tal:block\n
tal:condition="python: search_field is not None"\n tal:condition="python: search_field is not None"\n
tal:replace="structure python: search_field.render(value=param, key=alias)"/>\n tal:replace="structure python: search_field.render(value=param, key=alias)"/>\n
<input tal:condition="python: search_field is None" name="id" size="8" value=""\n <input tal:condition="python: search_field is None" name="id" size="5" value=""\n
tal:attributes="name alias; value param"/>\n type="text" tal:attributes="name alias; value param"/>\n
</tal:block>\n </tal:block>\n
</td>\n </td>\n
\n
</tr>\n </tr>\n
\n
\n
</thead>\n </thead>\n
\n \n
<tfoot tal:condition="python: int(here.total_size) > int(here.getMaxLineNumber())">\n <tfoot tal:condition="python: int(here.total_size) > int(here.getMaxLineNumber())">\n
<tr>\n <tr>\n
<td tal:attributes="colspan python: len(here.getSelectedColumnList())">\n <td tal:attributes="colspan python: len(here.getSelectedColumnList())">\n
<a class="pageNavigation"\n <a class="pageNavigation" href="portal_selections/firstPage:method"\n
tal:condition="python: here.current_page > 0"\n tal:condition="python: here.current_page > 0"\n
href="portal_selections/firstPage:method"\n title="First page: Page 1">|&lt;</a>\n
title="First Page: page 1">|&lt;</a>\n <a class="pageNavigation" href="portal_selections/previousPage:method"\n
<a class="pageNavigation"\n
href="portal_selections/previousPage:method"\n
tal:condition="python: here.current_page > 0"\n tal:condition="python: here.current_page > 0"\n
tal:attributes="title python: \'Previous Page: page \' + str(here.current_page - 1)"\n tal:attributes="title python: \'Previous Page: page \' + str(here.current_page - 1)"\n
title="Previous Page: page 67">&lt;&lt;</a>\n title="Previous page: Page 67">&lt;&lt;</a>\n
<select id="listbox_page_selection" name="list_start" title="Change Page" size="1"\n <select id="listbox_page_selection" name="list_start" title="Change Page" size="1"\n
onChange="submitAction(this.form, \'context/portal_selections/setPage\')"\n onChange="submitAction(this.form, \'context/portal_selections/setPage\')"\n
tal:define="lines here/getMaxLineNumber"\n tal:define="lines here/getMaxLineNumber"\n
...@@ -192,14 +187,14 @@ ...@@ -192,14 +187,14 @@
</option>\n </option>\n
</select>\n </select>\n
<a class="pageNavigation"\n <a class="pageNavigation"\n
href="portal_selections/nextPage:method"\n href="nextPage:method"\n
tal:condition="python: here.current_page + 1 < here.total_pages"\n tal:condition="python: here.current_page + 1 < here.total_pages"\n
tal:attributes="title python: \'Next Page: page \' + str(here.current_page + 1)"\n tal:attributes="title python: \'Next page: Page \' + str(here.current_page + 1)"\n
>&gt;&gt;</a>\n >&gt;&gt;</a>\n
<a class="pageNavigation"\n <a class="pageNavigation"\n
tal:condition="python: here.current_page + 1 < here.total_pages"\n tal:condition="python: here.current_page + 1 < here.total_pages"\n
href="portal_selections/lastPage:method"\n href="portal_selections/lastPage:method"\n
tal:attributes="title python: \'Last Page: page \' + str(here.total_pages)">&gt;|</a>\n tal:attributes="title python: \'Last page: Page \' + str(here.total_pages)">&gt;|</a>\n
</td>\n </td>\n
</tr>\n </tr>\n
</tfoot>\n </tfoot>\n
...@@ -232,7 +227,8 @@ ...@@ -232,7 +227,8 @@
</tal:block>\n </tal:block>\n
<!-- ListBox ends here -->\n <!-- ListBox ends here -->\n
\n \n
</tal:block> </tal:block>\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
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