Commit 91ae4c0e authored by Fabien Morin's avatar Fabien Morin

2009-03-24 fabien

* split ListBox_asHTML page template. Now there is 3 PT : ListBox_asSearchStyleHTML, ListBox_asTableStyleHTML and ListBox_asStandardHTML
* add css selectors to handle listbox search and table style
* change the method called in the top right search box
* move some form and scripts from erp5_web and erp5_new_km to here

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26146 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1bc16fb4
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_body</string> </key>
<value> <string>if getattr(context, \'getDocumentValue\', None) is not None:\n
return context.getDocumentValueList(**kw)\n
return context.portal_catalog(**kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>_apply_</string>
<string>_getattr_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getSearchResultList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_body</string> </key>
<value> <string>if top_your_search_text is not None:\n
your_search_text = top_your_search_text\n
return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
keep_items=dict(SearchableText=your_search_text, reset=1,\n
your_search_text=your_search_text,\n
list_style = \'search\',\n
all_languages=all_languages))\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>your_search_text=None, top_your_search_text=None, all_languages=False</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>your_search_text</string>
<string>top_your_search_text</string>
<string>all_languages</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_processAdvancedSearch</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_body</string> </key>
<value> <string>if bottom_your_search_text is not None:\n
your_search_text = bottom_your_search_text\n
return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
keep_items=dict(SearchableText=your_search_text, reset=1,\n
your_search_text=your_search_text,\n
list_style = \'search\',\n
all_languages=all_languages))\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>your_search_text=None, bottom_your_search_text=None, all_languages=False</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>your_search_text</string>
<string>bottom_your_search_text</string>
<string>all_languages</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_processAdvancedSearchBottom</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -53,34 +53,25 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Prepare a new query by combining an advanced search string\n
with other options. We consider that parameters are received\n
in absolute values (ie. not translated) and that they will\n
be displayed translated. For this reason, we provide\n
a translated portal type.\n
"""\n
translateString = context.Base_translateString\n
if new_advanced_search_portal_type:\n
if new_advanced_search_portal_type == \'all\':\n
return context.Base_redirect(\'ERP5Site_viewAdvancedSearchResultList\',\n
keep_items = dict(reset = 1, \n
advanced_search_text = new_advanced_search_text,\n
list_style= \'table\',\n
portal_type=list(context.getPortalDocumentTypeList())))\n
translated_type = translateString(new_advanced_search_portal_type)\n
return context.Base_redirect(\'ERP5Site_viewAdvancedSearchResultList\',\n
keep_items = dict(\n
reset = 1,\n
advanced_search_text = new_advanced_search_text,\n
list_style= \'table\',\n
translated_portal_type=translated_type)\n
)\n
else:\n
return context.Base_redirect(\'ERP5Site_viewAdvancedSearchResultList\',\n
keep_items = dict(reset = 1,\n
list_style= \'table\',\n
advanced_search_text = new_advanced_search_text))\n
<value> <string>translateString = context.Base_translateString\n
translated_type = \'\'\n
if field_your_search_portal_type:\n
if field_your_search_portal_type == \'all\':\n
return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
keep_items=dict(SearchableText=field_your_search_text, reset=1,\n
your_search_text=field_your_search_text,\n
portal_type=list(context.getPortalDocumentTypeList()),\n
list_style = \'search\',\n
all_languages=all_languages))\n
\n
translated_type = translateString(field_your_search_portal_type)\n
\n
return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
keep_items=dict(SearchableText=field_your_search_text, reset=1,\n
your_search_text=field_your_search_text,\n
translated_portal_type=translated_type,\n
list_style = \'search\',\n
all_languages=all_languages))\n
</string> </value>
</item>
<item>
......@@ -91,7 +82,7 @@ else:\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>new_advanced_search_text,new_advanced_search_portal_type=\'\'</string> </value>
<value> <string>field_your_search_text=\'\', field_your_search_portal_type=\'\', all_languages=False, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -111,20 +102,22 @@ else:\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>new_advanced_search_text</string>
<string>new_advanced_search_portal_type</string>
<string>field_your_search_text</string>
<string>field_your_search_portal_type</string>
<string>all_languages</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>translateString</string>
<string>translated_type</string>
<string>dict</string>
<string>list</string>
<string>translated_type</string>
</tuple>
</value>
</item>
......@@ -138,6 +131,8 @@ else:\n
<value>
<tuple>
<string></string>
<string></string>
<int>0</int>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>ERP5Site_viewSearchResult</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_thumbnail</string>
<string>listbox_modification_date</string>
<string>listbox_creation_date</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_viewSearchResult</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>ERP5Site_viewSearchResult</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Image" module="OFS.Image"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>search_style_icon.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEX///8AAABVwtN+AAAAAXRS
TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACw8AAAsPAZL5A6UAAAAHdElNRQfUBgoJJA/L
ACblAAAAEklEQVR4nGNggIH6f3jJDxBVAMc8COGOdeLvAAAAAElFTkSuQmCC</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>16</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>159</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>search_style_icon.png</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>16</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Image" module="OFS.Image"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>table_style_icon.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE
AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9AFHQYtIkW+0QQAAAAnSURB
VHicY2BgYPjPAAHk0pQDfCaRKzdiXUB29A2jMBgGLhiY3AgAGrIn2UYxv8kAAAAASUVORK5CYII=</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>16</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>170</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>table_style_icon.png</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>16</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -120,11 +120,10 @@
</span>\n
<span class="separator"><!--separator--></span>\n
<span id="search">\n
<input type="text" name="field_your_search_text" \n
onkeypress="submitFormOnEnter(event, \n
\'main_form\',\n
\'Base_searchResultList\');"/>\n
<button type="submit" name="Base_searchResultList:method" title="Search"\n
<input type="hidden" name="all_languages" value="1" />\n
<input accesskey="4" type="text" name="field_your_search_text" \n
onkeypress="submitFormOnEnter(event, \'main_form\', \'ERP5Site_viewQuickSearchResultList\');" />\n
<button type="submit" name="ERP5Site_viewQuickSearchResultList:method" title="Search"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
......
2009-03-24 fabien
* split ListBox_asHTML page template. Now there is 3 PT : ListBox_asSearchStyleHTML, ListBox_asTableStyleHTML and ListBox_asStandardHTML
* add css selectors to handle listbox search and table style
* change the method called in the top right search box
* move some form and scripts from erp5_web and erp5_new_km to here
2009-02-20 yusei
* Move ERP5Site_setSkinCache to erp5_forge and set http_cache as default cache manager to all image/css/js files in skin folders.
......
659
\ No newline at end of file
668
\ 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