Commit db3a0f51 authored by Yusei Tahara's avatar Yusei Tahara

Added anchor column option. It provides clickable image on left side of line.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18889 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a7cbe65f
...@@ -269,6 +269,14 @@ class ListBoxWidget(Widget.Widget): ...@@ -269,6 +269,14 @@ class ListBoxWidget(Widget.Widget):
required=0) required=0)
property_names.append('select') property_names.append('select')
anchor = fields.CheckBoxField('anchor',
title='Anchor Column',
description=(
'An optional anchor column which can always clickable.'),
default='',
required=0)
property_names.append('anchor')
editable_columns = fields.ListTextAreaField('editable_columns', editable_columns = fields.ListTextAreaField('editable_columns',
title="Editable Columns", title="Editable Columns",
description=( description=(
...@@ -589,6 +597,13 @@ class ListBoxRenderer: ...@@ -589,6 +597,13 @@ class ListBoxRenderer:
showSelectColumn = lazyMethod(showSelectColumn) showSelectColumn = lazyMethod(showSelectColumn)
def showAnchorColumn(self):
"""Return a boolean that represents whether a anchor column is displayed or not.
"""
return self.field.get_value('anchor')
showAnchorColumn = lazyMethod(showAnchorColumn)
def showStat(self): def showStat(self):
"""Return a boolean that represents whether a stat line is displayed or not. """Return a boolean that represents whether a stat line is displayed or not.
...@@ -2101,7 +2116,7 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): ...@@ -2101,7 +2116,7 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
url = unicode(url.decode('utf-8')) url = unicode(url.decode('utf-8'))
html = u'<a href="%s">%s</a>' % (url, processed_value) html = u'<a href="%s">%s</a>' % (url, processed_value)
html_list.append((html, original_value, error, editable_field)) html_list.append((html, original_value, error, editable_field, url))
return html_list return html_list
......
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