Commit d7283d6b authored by Romain Courteaud's avatar Romain Courteaud

Add a new listbox parameter to define the list of display style (tabular, search, ...)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35526 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de457c00
...@@ -389,6 +389,14 @@ class ListBoxWidget(Widget.Widget): ...@@ -389,6 +389,14 @@ class ListBoxWidget(Widget.Widget):
required=0) required=0)
property_names.append('report_root_list') property_names.append('report_root_list')
display_style_list = fields.ListTextAreaField('display_style_list',
title="Display style",
description=(
"A list of styles which change the listbox rendering."),
default=[],
required=0)
property_names.append('display_style_list')
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'
...@@ -916,6 +924,15 @@ class ListBoxRenderer: ...@@ -916,6 +924,15 @@ class ListBoxRenderer:
getReportRootList = lazyMethod(getReportRootList) getReportRootList = lazyMethod(getReportRootList)
def getDisplayStyleList(self):
"""Return the list of avaible display style. Make sure that the
titles are in unicode"""
display_style_list = self.field.get_value('display_style_list')
return [(str(c[0]), unicode(c[1], self.getEncoding())) for c in \
display_style_list]
getDisplayStyleList = lazyMethod(getDisplayStyleList)
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.
""" """
......
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