[gen] Bugfix in Ref field.

This commit is contained in:
Gaetan Delannay 2014-03-11 16:22:28 +01:00
parent d956c1f17a
commit eba86ae6bc
2 changed files with 5 additions and 4 deletions

View file

@ -180,7 +180,8 @@ class Ref(Field):
align="column.align" var2="refField=column.field">
<span>:_(refField.labelId)</span>
<x>:field.pxSortIcons</x>
<x var="className=tiedClassName">:tool.pxShowDetails</x>
<x var="className=tiedClassName;
field=refField">:tool.pxShowDetails</x>
</th>
</tr>
<tr for="ztied in zobjects" valign="top"

View file

@ -14,13 +14,13 @@ class ToolWrapper(AbstractWrapper):
# Icon for hiding/showing details below the title of an object shown in a
# list of objects.
pxShowDetails = Px('''
<img if="ztool.subTitleIsUsed(className) and (field.name == 'title')"
<img if="(field.name == 'title') and ztool.subTitleIsUsed(className)"
class="clickable" src=":url('toggleDetails')"
onclick="toggleSubTitles()"/>''')
# Displays up/down arrows in a table header column for sorting a given
# column. Requires variables "sortable", 'filterable' and 'field'.
pxSortAndFilter = Px('''<x>
pxSortAndFilter = Px('''
<x if="sortable">
<img if="(sortKey != field.name) or (sortOrder == 'desc')"
onclick=":navBaseCall.replace('**v**', '0,%s,%s,%s' % \
@ -37,7 +37,7 @@ class ToolWrapper(AbstractWrapper):
<img onclick=":navBaseCall.replace('**v**', '0, %s,%s,%s' % \
(q(sortKey), q(sortOrder), q(field.name)))"
src=":url('funnel')" class="clickable"/>
</x></x>''')
</x>''')
# Buttons for navigating among a list of objects (from a Ref field or a
# query): next,back,first,last...