Commit be4e2d62 authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

Force listbox page navigation to work

Override ListBox_viewSliderPageNavigationRenderer while not able to make default ajax navigation renderer to work
parent 1d4ab490
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<!-- Slider navigation with input (i.e. first, previous, next, last links)-->\n
<tal:block metal:define-macro="page_navigation">\n
<tal:block tal:condition="python: here.total_pages > 1">\n
\n
<!-- Non gadget mode -->\n
<tal:block tal:condition="not: is_gadget_mode">\n
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/first_previous_page_navigation" />\n
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/type_in_page_navigation" />\n
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/next_last_page_navigation" />\n
</tal:block>\n
\n
<!-- Gadget mode -->\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
first_page python: 0;\n
last_page python: total_page;">\n
\n
<!-- First & Previous button navigation --> \n
<tal:block tal:condition="python: here.current_page > 0">\n
<button \n
title = "First Page"\n
name = "firstPage"\n
type = "button"\n
class = "listbox_first_page"\n
tal:attributes="\n
value string:|&lt;;\n
onclick string:document.location.href=\'${context_url}/${field_id}_setPage?${field_id}_page_start=${first_page}&list_selection_name=ung_document_list_selection&listbox_uid:list=[]\';\n
class python: test(is_default_listbox_field, \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id);"\n
i18n:domain="ui" i18n:attributes="title">\n
<span class="image"/>\n
</button>\n
\n
<button \n
title = "Previous Page"\n
name = "previousPage"\n
type = "button"\n
class = "listbox_previous_page"\n
tal:attributes="\n
value string:|&lt;;\n
onclick string:document.location.href=\'${context_url}/${field_id}_setPage?${field_id}_page_start=${previous_page}&list_selection_name=ung_document_list_selection&listbox_uid:list=[]\';\n
class python: test(is_default_listbox_field, \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id);"\n
i18n:domain="ui" i18n:attributes="title">\n
<span class="image"/>\n
</button>\n
</tal:block>\n
\n
<!-- Type in listbox page number navigation --> \n
<input class="listbox_set_page" \n
name="page_start" onblur="this.value=this.defaultValue"\n
tal:define="params python: {field_id+\'_setPage:method\':\'\',field_id+\'_page_start\':\'this.value\',\'list_style\':list_style}"\n
tal:attributes="name string:${field_id}_page_start;\n
class python: test(is_default_listbox_field, \'listbox_set_page\', \'listbox_set_page %s_set_page\' %field_id);\n
value python:here.current_page + 1;\n
size python:len(str(here.total_pages));\n
onkeypress string:javascript:if(event.keyCode==13){document.location.href=\'${context_url}/${field_id}_setPage?${field_id}_page_start=\'+this.value+\'&list_selection_name=ung_document_list_selection&listbox_uid:list=[]\';; return false;;};"/>\n
/ <tal:block content="here/total_pages" />\n
\n
<!-- Next & Last button navigation --> \n
<tal:block tal:condition="python: current_page < total_page">\n
<button \n
title = "Next Page"\n
name = "nextPage"\n
type = "button"\n
class = "listbox_next_page"\n
tal:attributes="\n
value string:|&lt;;\n
onclick string:document.location.href=\'${context_url}/${field_id}_setPage?${field_id}_page_start=${next_page}&list_selection_name=ung_document_list_selection&listbox_uid:list=[]\';\n
class python: test(is_default_listbox_field, \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id);"\n
i18n:domain="ui" i18n:attributes="title">\n
<span class="image"/>\n
</button>\n
\n
<button \n
title = "Last Page"\n
name = "lastPage"\n
type = "button"\n
class = "listbox_last_page"\n
tal:attributes="\n
value string:|&lt;;\n
onclick string:document.location.href=\'${context_url}/${field_id}_setPage?${field_id}_page_start=${last_page}&list_selection_name=ung_document_list_selection&listbox_uid:list=[]\';\n
class python: test(is_default_listbox_field, \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id);"\n
i18n:domain="ui" i18n:attributes="title">\n
<span class="image"/>\n
</button>\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2011-06-09 gabriel.oliveira
* Force listbox page navigation to work
2011-06-08 gabriel.oliveira
* Add Xinha Editor as an option to Preferred Text Editor
......
371
\ No newline at end of file
372
\ 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