Commit 6c9cd06c authored by Ivan Tyagov's avatar Ivan Tyagov

Add full text listbox configuration.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37339 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 20ce0e42
...@@ -405,6 +405,21 @@ class ListBoxWidget(Widget.Widget): ...@@ -405,6 +405,21 @@ class ListBoxWidget(Widget.Widget):
required=0) required=0)
property_names.append('default_display_style') property_names.append('default_display_style')
full_text_search_key = fields.StringField('full_text_search_key',
title="Full text search key",
description=("Full text search key used to make query."),
default=None,
required=0)
property_names.append('full_text_search_key')
full_text_search_key_script = fields.StringField('full_text_search_key_script',
title="Full text search key script",
description=("Full text search key script used to make query."),
default=None,
required=0)
property_names.append('full_text_search_key_script')
list_action = fields.StringField('list_action', list_action = fields.StringField('list_action',
title='List Action', title='List Action',
description=('The id of the object action' description=('The id of the object action'
...@@ -942,13 +957,23 @@ class ListBoxRenderer: ...@@ -942,13 +957,23 @@ class ListBoxRenderer:
getDisplayStyleList = lazyMethod(getDisplayStyleList) getDisplayStyleList = lazyMethod(getDisplayStyleList)
def getDefaultDisplayStyle(self): def getDefaultDisplayStyle(self):
"""Return the list of avaible display style. Make sure that the """Return the default display list style."""
titles are in unicode""" return self.field.get_value('default_display_style')
default_display_style = self.field.get_value('default_display_style')
return default_display_style
getDefaultDisplayStyle = lazyMethod(getDefaultDisplayStyle) getDefaultDisplayStyle = lazyMethod(getDefaultDisplayStyle)
def getFullTextSearchKey(self):
"""Return the full text search key."""
return self.field.get_value('full_text_search_key')
getFullTextSearchKey = lazyMethod(getFullTextSearchKey)
def getFullTextSearchKeyScript(self):
"""Return the full text search key."""
return self.field.get_value('full_text_search_key_script')
getFullTextSearchKeyScript = lazyMethod(getFullTextSearchKeyScript)
def getSearchColumnIdSet(self): def getSearchColumnIdSet(self):
"""Return the set of the ids of the search columns. Fall back to the catalog schema, if not defined. """Return the set of the ids of the search columns. Fall back to the catalog schema, if not defined.
""" """
...@@ -1570,6 +1595,7 @@ class ListBoxRenderer: ...@@ -1570,6 +1595,7 @@ class ListBoxRenderer:
search_column_id_set = self.getSearchColumnIdSet() search_column_id_set = self.getSearchColumnIdSet()
if param_dict is None: if param_dict is None:
param_dict = self.getParamDict() param_dict = self.getParamDict()
value_list = [] value_list = []
for (sql, title), alias in zip(self.getSelectedColumnList(), self.getColumnAliasList()): for (sql, title), alias in zip(self.getSelectedColumnList(), self.getColumnAliasList()):
if sql in search_column_id_set: if sql in search_column_id_set:
......
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