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 e69cd901a3448235ee5eefc61ba8445716a8929d..e388414932860680fef5ec4fded1a4785ae599d4 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 @@ -61,7 +61,13 @@ show_search_line here/showSearchLine;\n is_web_mode request/is_web_mode | nothing;\n list_style python:request.get(\'list_style\', is_web_mode and \'table\' or None);\n - is_gadget_mode request/is_gadget_mode | nothing;">\n + is_gadget_mode request/is_gadget_mode | nothing;\n + box_relative_url python: request.get(\'box_relative_url\', \'\');\n + box python: real_context.restrictedTraverse(box_relative_url); \n + box_id python: \'visual_\'+box.getId();\n + dom_id python: request.get(\'dom_id\',None) or box_id;\n + Base_translateString python: real_context.Base_translateString;\n + ">\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"\n @@ -75,8 +81,6 @@ <input tal:condition="python:form_id" \n type="hidden" name="gadget_form_id"\n tal:attributes="value form_id" />\n - <input type="hidden" name="list_start" \n - tal:attributes="value here/getLineStart" />\n </tal:block>\n \n <tal:replace tal:content="nothing">\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml index e79397bd7acae7e27898780219e21c0afc059ae9..e5492b7e5aa0a0810678fcf826f12b7561035d43 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml @@ -296,38 +296,13 @@ </td>\n </tr>\n </tal:block>\n + <tr>\n + <td class="pageNavigation" colspan="2" style="white-space: nowrap; vertical-align: middle; text-align: right;">\n + <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n + </td>\n + </tr>\n </table>\n </div>\n -\n - <!-- result page -->\n - <div class="centeredInner searchPages" tal:condition="python: total_line > listbox_max_lines">\n - <p>Result Page:\n - <!-- Dirty Hack that will generate different setPage urls. This is a bug in selection_tool! -->\n - <a href="#"\n - tal:condition="python: not is_gadget_mode and field_id.strip() != \'listbox\'"\n - tal:repeat="p python: range(0, here.total_pages)"\n - tal:content="python: p+1"\n - tal:attributes="class python: p == here.current_page and \'selected\' or nothing;\n - href python: \'%s_setPage?%s_list_start=%s&listbox_uid:list=&list_selection_name=&list_style=search\' % (field_id, field_id, p*listbox_max_lines)"/>\n -\n - <a href="#"\n - tal:condition="python: not is_gadget_mode and field_id.strip()==\'listbox\'"\n - tal:repeat="p python: range(0, here.total_pages)"\n - tal:content="python: p+1"\n - tal:attributes="class python: p == here.current_page and \'selected\' or nothing;\n - href python: \'setPage?%s_page_selection=%s&selection_name=%s&form_id=%s&listbox_uid:list=&list_selection_name=%s&list_start=%s&reset=1\' % (field_id, p+1, selection_name, form_id, selection_name, p*listbox_max_lines)"/>\n -\n - <tal:block tal:repeat="p python: range(0, here.total_pages)">\n - <a tal:condition="is_gadget_mode"\n - tal:define = "params python: {\'setPage:method\':\'\',\n - \'list_start\': p*listbox_max_lines, \'list_style\':\'search\'}"\n - style="cursor:pointer;"\n - tal:content="python: p+1"\n - tal:attributes="class python: p == here.current_page and \'selected\' or nothing;\n - onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id,params)"/>\n - </tal:block>\n - </p>\n - </div>\n \n <!-- Advanced Search footer -->\n <div class="centeredInner extendedSearchBar" tal:condition="python: not is_gadget_mode and show_search_line">\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asStandardHTML.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asStandardHTML.xml index ce45e54f9199dc70bbf9e32015e2fcef743612c5..ef354b77aa0b011bb120f248cc05cd2ed2f5fe4b 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asStandardHTML.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asStandardHTML.xml @@ -114,53 +114,9 @@ tal:attributes="id string:${field_id}_item_number"\n i18n:translate="" i18n:domain="ui"> - <tal:block tal:replace="python: len(here.getCheckedUidList())" i18n:name="number">0</tal:block> item(s) selected</span>\n </td>\n -\n -<tal:block tal:condition="python: here.total_pages > 1">\n - <tal:block tal:condition="not: is_gadget_mode">\n - <td style="white-space: nowrap; vertical-align: middle; text-align: center;">\n - <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n - </td>\n - </tal:block>\n - <tal:block tal:condition="is_gadget_mode">\n - <td style="white-space: nowrap; vertical-align: middle; text-align: center;">\n - <img tal:condition="python: here.current_page > 0"\n - style="display: block; cursor: pointer;" \n - alt="Previous Page"\n - id="listbox_previous_page" title="Previous Page" \n - src="1leftarrowv.png" name="previous"\n - tal:define ="params python: {field_id+\'_previousPage:method\':\'\'}"\n - tal:attributes="id string:${field_id}_previous_page;\n - src string:${portal_url_string}/images/1leftarrowv.png;\n - onclick python:\n - real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box_relative_url,box_id,params)"/>\n - </td>\n - <td style="white-space: nowrap; vertical-align: middle; text-align: center">\n - <select id="listbox_page_selection" name="list_start" title="Change Page" size="1"\n - class="listbox_page_selection"\n - tal:define="params python: {field_id+\'_setPage:method\':\'\',\'list_start\':\'this.value\'};\n - lines here/getMaxLineNumber" \n - tal:attributes=\'id string:${field_id}_page_selection;\n - onChange python: real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box_relative_url,box_id,params).replace("\\"this.value\\"","this.value")\'\n - i18n:domain="ui" i18n:attributes="title">\n - <option value="0"\n - tal:repeat="p python: range(0, here.total_pages)"\n - tal:attributes="selected python: p == here.current_page;\n - value python: p * lines"\n - i18n:domain="ui" i18n:translate=""><tal:block tal:replace="python: p + 1" i18n:name="page">0</tal:block> of <tal:block tal:replace="here/total_pages" i18n:name="total_pages">1</tal:block></option>\n - </select>\n - </td>\n - <td style="white-space: nowrap; vertical-align: middle; text-align: center; padding-right:5px;">\n - <img tal:condition="python: here.current_page < here.total_pages - 1"\n - style="display:block; cursor: pointer;" alt="Previous Page"\n - id="listbox_next_page" title="Next Page" src="1rightarrowv.png" name="next"\n - class="listbox_next_page"\n - tal:define ="params python: {field_id+\'_nextPage:method\':\'\'}"\n - tal:attributes="id string:${field_id}_next_page;\n - src string:${portal_url_string}/images/1rightarrowv.png;\n - onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box_relative_url,box_id,params)"/>\n - </td>\n - </tal:block>\n -</tal:block>\n + <td style="white-space: nowrap; vertical-align: middle; text-align: center;">\n + <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n + </td>\n </tr>\n </table>\n </div>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml index c002265e6fadb74f7da562d063747bf3e08ac8b5..33c16d17199a521e2f54a45c383ec130abbe1ad4 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml @@ -57,17 +57,8 @@ title="Filter" alt="Filter" name="Base_doSelect:method"\n type="submit" style="display: none"/>\n \n - <input tal:condition="python:is_gadget_mode" \n - type="hidden" name="list_start" \n - tal:attributes="value here/getLineStart" />\n - \n <tal:block tal:define="expand python: 1;\n table_form_id request/current_form_id | form_id;\n - Base_translateString python: real_context.Base_translateString;\n - box_relative_url python: request.get(\'box_relative_url\', \'\');\n - box python: real_context.restrictedTraverse(box_relative_url); \n - box_id python: \'visual_\'+box.getId();\n - dom_id python: request.get(\'dom_id\',None) or box_id;\n your_search_text python:here.getParamDict().get(\'your_search_text\', None)">\n <tal:block metal:use-macro="template/macros/ListBoxContainer">\n <tal:block metal:fill-slot="ListBoxBody">\n @@ -195,7 +186,7 @@ \n <tr class ="thead">\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;">\n + class="Data" style="width: 50px; text-align: center; vertical-align: middle;float:left;">\n <input id="listbox_check_all" type="image"\n name="checkAll:method" value="1"\n src="checkall.png" alt="Check All" title="Check All"\n @@ -328,61 +319,9 @@ <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n </td>\n <!-- Page navigation for gadget mode -->\n -\n - <td class="pageNavigation"\n - tal:condition = "is_gadget_mode"\n - tal:define="max_lines python: here.getMaxLineNumber();\n - total_page python: here.total_pages;\n - page_id python: here.current_page;\n - current_page python: page_id + 1;\n - previous_page python: current_page - 1;\n - next_page python: current_page + 1;"\n + <td class="pageNavigation" style="white-space: nowrap; vertical-align: middle; text-align: right;"\n tal:attributes="colspan python: len(here.getSelectedColumnList()) + bool(show_select_column)">\n -\n - <tal:block tal:condition="python: current_page > 1">\n - <button tal:define ="params python: {field_id+\'_firstPage:method\':\'\', \'list_style\':\'table\'}"\n - title="First page: Page 1" name="firstPage"\n - type = "button" \n - tal:attributes="id string:${field_id}_first_page;\n - value string:|<;\n - onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">|<</button>\n - <button tal:define ="params python: {field_id+\'_previousPage:method\':\'\', \'list_style\':\'table\'}"\n - title="Previous"\n - name="previous"\n - type="button"\n - tal:attributes="title python: \'Previous Page: page %s\' % previous_page;\n - id string:${field_id}_previous_page;\n - value string:<<;\n - onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)"><<</button>\n - </tal:block>\n - <select tal:define ="params python: {field_id+\'_setPage:method\':\'\',\'list_start\':\'this.value\',\'list_style\':\'table\'}"\n - title="Change Page" size="1"\n - name="changePage"\n - tal:attributes=\'id string:${field_id}_page_selection;\n - onChange python: real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")\'\n - i18n:domain="ui" i18n:attributes="title">\n - <option\n - tal:repeat="p python: range(total_page)"\n - tal:attributes="selected python: p == page_id;\n - value python: p * max_lines"\n - i18n:domain="ui" i18n:translate="">Page <tal:block tal:replace="python: p + 1" i18n:name="page">0</tal:block> of <tal:block tal:replace="total_page" i18n:name="total_pages">1</tal:block></option>\n - </select>\n - <tal:block tal:condition="python: current_page < total_page">\n - <button tal:define ="params python: {field_id+\'_nextPage:method\':\'\',\'list_style\':\'table\'}"\n - title="Next"\n - name="next"\n - type="button"\n - tal:attributes="title python: \'Next Page: page %s\' % next_page;\n - id string:${field_id}_next_page;\n - onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">>></button>\n - <button tal:define ="params python: {field_id+\'_lastPage:method\':\'\',\'total_size\':int(here.total_size), \'list_style\':\'table\'}"\n - title="Last Page"\n - name="lastPage"\n - type="button"\n - tal:attributes="title python: Base_translateString(\'Last page: Page ${total_page}\', mapping={\'total_page\': total_page});\n - id string:${field_id}_last_page;\n - onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">>|</button>\n - </tal:block>\n + <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n </td>\n </tr>\n </table>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml index 88dc6e3799b6dd210b9c7b66ad5c25aa374636d0..0a0a13bfac0ad81027c516da6162b55ba38bbacd 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml @@ -44,23 +44,24 @@ xmlns:metal="http://xml.zope.org/namespaces/metal"\n xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n <tal:block metal:define-macro="page_navigation">\n - <tal:block tal:condition="python: here.current_page > 0">\n - <input\n - id="listbox_first_page" type="image" src="2leftarrowv.png"\n - title="First Page" name="firstPage:method"\n - class="listbox_first_page"\n - tal:attributes="id string:${field_id}_first_page;\n - name string:${field_id}_firstPage:method;\n - src string:${portal_url_string}/images/2leftarrowv.png"\n - i18n:domain="ui" i18n:attributes="title" />\n - <input\n - id="listbox_previous_page" type="image" src="1leftarrowv.png"\n - title="Previous Page" name="previousPage:method"\n - class="listbox_previous_page"\n - tal:attributes="id string:${field_id}_previous_page;\n - name string:${field_id}_previousPage:method;\n - src string:${portal_url_string}/images/1leftarrowv.png"\n - i18n:domain="ui" i18n:attributes="title" />\n + <tal:block tal:condition="not: is_gadget_mode">\n + <tal:block tal:condition="python: here.current_page > 0">\n + <input\n + id="listbox_first_page" type="image" src="2leftarrowv.png"\n + title="First Page" name="firstPage:method"\n + class="listbox_first_page"\n + tal:attributes="id string:${field_id}_first_page;\n + name string:${field_id}_firstPage:method;\n + src string:${portal_url_string}/images/2leftarrowv.png"\n + i18n:domain="ui" i18n:attributes="title" />\n + <input\n + id="listbox_previous_page" type="image" src="1leftarrowv.png"\n + title="Previous Page" name="previousPage:method"\n + class="listbox_previous_page"\n + tal:attributes="id string:${field_id}_previous_page;\n + name string:${field_id}_previousPage:method;\n + src string:${portal_url_string}/images/1leftarrowv.png"\n + i18n:domain="ui" i18n:attributes="title" />\n </tal:block>\n <input id="listbox_set_page" name="page_start" onblur="this.value=this.defaultValue"\n tal:attributes="id string:${field_id}_set_page;\n @@ -68,22 +69,86 @@ value python:here.current_page + 1;\n size python:len(str(here.total_pages));\n onkeyup string:submitFormOnEnter(event, this.form, \'${field_id}_setPage\')" />\n - / <tal:block content="here/total_pages" />\n + / \n + <tal:block content="here/total_pages" />\n <tal:block tal:condition="python: here.current_page < here.total_pages - 1">\n - <input\n - id="listbox_next_page" type="image" src="1rightarrowv.png"\n - title="Next Page" name="nextPage:method" class="listbox_next_page"\n - tal:attributes="id string:${field_id}_next_page;\n - name string:${field_id}_nextPage:method;\n - src string:${portal_url_string}/images/1rightarrowv.png"\n - i18n:domain="ui" i18n:attributes="title" />\n - <input\n - id="listbox_last_page" type="image" src="2rightarrowv.png"\n - title="Last Page" name="lastPage:method" class="listbox_last_page"\n - tal:attributes="id string:${field_id}_last_page;\n - name string:${field_id}_lastPage:method;\n - src string:${portal_url_string}/images/2rightarrowv.png"\n - i18n:domain="ui" i18n:attributes="title" />\n + <input\n + id="listbox_next_page" type="image" src="1rightarrowv.png"\n + title="Next Page" name="nextPage:method" class="listbox_next_page"\n + tal:attributes="id string:${field_id}_next_page;\n + name string:${field_id}_nextPage:method;\n + src string:${portal_url_string}/images/1rightarrowv.png"\n + i18n:domain="ui" i18n:attributes="title" />\n + <input\n + id="listbox_last_page" type="image" src="2rightarrowv.png"\n + title="Last Page" name="lastPage:method" class="listbox_last_page"\n + tal:attributes="id string:${field_id}_last_page;\n + name string:${field_id}_lastPage:method;\n + src string:${portal_url_string}/images/2rightarrowv.png"\n + i18n:domain="ui" i18n:attributes="title" />\n + </tal:block>\n + </tal:block>\n + \n + <tal:block tal:condition="is_gadget_mode"\n + tal:define="max_lines python: here.getMaxLineNumber();\n + total_page python: here.total_pages;\n + page_id python: here.current_page;\n + current_page python: page_id + 1;\n + previous_page python: current_page - 1;\n + next_page python: current_page + 1;">\n + <tal:block tal:condition="python: here.current_page > 0">\n + <button tal:define ="params python: {field_id+\'_firstPage:method\':\'\', \'list_style\':list_style}"\n + title="First Page" \n + name="firstPage"\n + type = "button" \n + class = "listbox_first_page"\n + tal:attributes="id string:${field_id}_first_page;\n + value string:|<;\n + onclick python:\n + real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">\n + <img src="images/2leftarrowv.png"/>\n + </button>\n + <button tal:define ="params python: {field_id+\'_previousPage:method\':\'\',\'page_start\':here.current_page+1,\'list_style\':list_style}"\n + title="Previous Page"\n + name="previousPage"\n + type="button"\n + class="listbox_previous_page"\n + tal:attributes="id string:${field_id}_previous_page;\n + value string:<<;\n + onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">\n + \n + <img src="images/1leftarrowv.png"/>\n + </button>\n + </tal:block>\n + <input id="listbox_set_page" name="page_start"\n + tal:define="params python: {field_id+\'_setPage:method\':\'\',field_id+\'_page_start\':\'this.value\',\'list_style\':list_style}"\n + tal:attributes=\'id string:${field_id}_set_page;\n + name string:${field_id}_page_start;\n + value python:here.current_page + 1;\n + size python:len(str(here.total_pages));\n + onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n + / \n + <tal:block content="here/total_pages" />\n + <tal:block tal:condition="python: current_page < total_page">\n + <button tal:define ="params python: {field_id+\'_nextPage:method\':\'\',\'page_start\':here.current_page+1,\'list_style\':list_style}"\n + title="Next Page"\n + name="nextPage"\n + type="button"\n + class="listbox_next_page"\n + tal:attributes="id string:${field_id}_next_page;\n + onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">\n + <img src="images/1rightarrowv.png"/>\n + </button>\n + <button tal:define ="params python: {field_id+\'_lastPage:method\':\'\',\'total_size\':int(here.total_size), \'list_style\':list_style}"\n + title="Last Page"\n + name="lastPage"\n + type="button"\n + class="listbox_last_page"\n + tal:attributes="id string:${field_id}_last_page;\n + onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params)">\n + <img src="images/2rightarrowv.png"/>\n + </button>\n + </tal:block>\n </tal:block>\n </tal:block>\n </tal:block>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index ddc27b0c1a3d0eeb2a02efd091c5fbd9a14117e6..f0a7147fa36c03ba4f10e2dc7636d4204dfc94e0 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -739 \ No newline at end of file +740 \ No newline at end of file