[Erp5-report] r37313 ivan - /erp5/trunk/products/ERP5Form/ListBox.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 28 10:02:27 CEST 2010
Author: ivan
Date: Wed Jul 28 10:02:23 2010
New Revision: 37313
URL: http://svn.erp5.org?rev=37313&view=rev
Log:
Listbox can define default display list.
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=37313&r1=37312&r2=37313&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py [utf8] Wed Jul 28 10:02:23 2010
@@ -397,6 +397,14 @@ class ListBoxWidget(Widget.Widget):
required=0)
property_names.append('display_style_list')
+ default_display_style = fields.StringField('default_display_style',
+ title="Default display style",
+ description=(
+ "A default display style for listbox rendering."),
+ default='table',
+ required=0)
+ property_names.append('default_display_style')
+
list_action = fields.StringField('list_action',
title='List Action',
description=('The id of the object action'
@@ -933,6 +941,14 @@ 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
+
+ getDefaultDisplayStyle = lazyMethod(getDefaultDisplayStyle)
+
def getSearchColumnIdSet(self):
"""Return the set of the ids of the search columns. Fall back to the catalog schema, if not defined.
"""
@@ -2426,7 +2442,6 @@ class ListBoxHTMLRendererLine(ListBoxRen
html = u'<a href="%s">%s</a>' % (url, html)
html_list.append((html, original_value, error, editable_field, url))
-
return html_list
allow_class(ListBoxHTMLRendererLine)
More information about the Erp5-report
mailing list