[Erp5-report] r37339 ivan - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 28 15:12:41 CEST 2010


Author: ivan
Date: Wed Jul 28 15:12:39 2010
New Revision: 37339

URL: http://svn.erp5.org?rev=37339&view=rev
Log:
Add full text listbox configuration.

Modified:
    erp5/trunk/products/ERP5Form/ListBox.py

Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=37339&r1=37338&r2=37339&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py [utf8] Wed Jul 28 15:12:39 2010
@@ -405,6 +405,21 @@ class ListBoxWidget(Widget.Widget):
                                 required=0)
     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',
                                  title='List Action',
                                  description=('The id of the object action'
@@ -942,13 +957,23 @@ class ListBoxRenderer:
   getDisplayStyleList = lazyMethod(getDisplayStyleList)
 
   def getDefaultDisplayStyle(self):
-    """Return the list of avaible display style. Make sure that the 
-    titles are in unicode"""
-    default_display_style = self.field.get_value('default_display_style')
-    return default_display_style
+    """Return the default display list style."""
+    return self.field.get_value('default_display_style')
 
   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):
     """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:
     search_column_id_set = self.getSearchColumnIdSet()
     if param_dict is None:
       param_dict = self.getParamDict()
+
     value_list = []
     for (sql, title), alias in zip(self.getSelectedColumnList(), self.getColumnAliasList()):
       if sql in search_column_id_set:




More information about the Erp5-report mailing list