[gen] For Strings with validator=String.URL, an HTML link is rendered in view layouts; added a 'real' 'state' field to any Appy class, allowing to use it in search screens for example; added 2 hook methods: getIcons and getSubTitles, allowing to add, in lists of objects (Refs or queries), icons besides the title and anything below it; optimized query.pt: for every new query, 1 server request is done (previously, one standard request + one ajax request were done); removed columns 'actions' (Refs, query): action icons are not included in the column containing the title (we avoid having empty columns whhen no action is available).
This commit is contained in:
parent
7240561f7f
commit
4a69a3beb2
20 changed files with 142 additions and 131 deletions
|
@ -1157,6 +1157,7 @@ class String(Type):
|
|||
# field of format CAPTCHA by page, because the captcha challenge is
|
||||
# stored in the session at some global key.
|
||||
self.format = format
|
||||
self.isUrl = validator == String.URL
|
||||
# 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
|
||||
|
@ -1225,6 +1226,8 @@ class String(Type):
|
|||
return {'view': 'l-f', 'edit': 'lrv-f'}
|
||||
|
||||
def getValue(self, obj):
|
||||
# Cheat if this field represents p_obj's state
|
||||
if self.name == 'state': return obj.State()
|
||||
value = Type.getValue(self, obj)
|
||||
if not value:
|
||||
if self.isMultiValued(): return emptyTuple
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue