Skip to content

Commit

Permalink
Added the ability to specify any set of characters as the "bullet con…
Browse files Browse the repository at this point in the history
…tent"

like it is supported by ReportLab.
  • Loading branch information
strichter committed Feb 3, 2015
1 parent 9895c7e commit fdc5f7d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/z3c/rml/attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ def __init__(self, value_types=(), *args, **kw):
super(Combination, self).__init__(*args, **kw)
self.value_types = value_types

@property
def element(self):
return self.context.element

@property
def parent(self):
return self.context.parent

def fromUnicode(self, value):
for value_type in self.value_types:
bound = value_type.bind(self)
Expand Down
10 changes: 8 additions & 2 deletions src/z3c/rml/stylesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,14 @@ class IBaseListStyle(IMinimalListStyle):
start = attr.Combination(
title=u'Start Value',
description=u'The counter start value.',
value_types=(attr.Integer(),
attr.Choice(choices=interfaces.UNORDERED_BULLET_VALUES)),
value_types=(
# Numeric start value.
attr.Integer(),
# Bullet types.
attr.Choice(choices=interfaces.UNORDERED_BULLET_VALUES),
# Arbitrary text.
attr.String(),
),
required=False)


Expand Down

0 comments on commit fdc5f7d

Please sign in to comment.