appy.gen: added params String.allowImageUpload and String.styles for tuning the in-line editor corresponding to a String instance with format=XHTML; managed borders images uploaded in such a field; bugfix for https://bugs.launchpad.net/appy/+bug/913171 (appy.shared.dav).

This commit is contained in:
Gaetan Delannay 2012-01-09 17:00:47 +01:00
parent 2bd3fe1eeb
commit 30a51b7c1d
8 changed files with 47 additions and 32 deletions

View file

@ -1113,8 +1113,16 @@ class String(Type):
specificWritePermission=False, width=None, height=None,
maxChars=None, colspan=1, master=None, masterValue=None,
focus=False, historized=False, mapping=None, label=None,
transform='none'):
transform='none', styles=('p','h1','h2','h3','h4'),
allowImageUpload=True):
# According to format, the widget will be different: input field,
# textarea, inline editor...
self.format = format
# When format is XHTML, the list of styles that the user will be able to
# select in the styles dropdown is defined hereafter.
self.styles = styles
# When format is XHTML, do we allow the user to upload images in it ?
self.allowImageUpload = allowImageUpload
# The following field has a direct impact on the text entered by the
# user. It applies a transformation on it, exactly as does the CSS
# "text-transform" property. Allowed values are those allowed for the