[gen] Bugfixes.
This commit is contained in:
parent
fb65cf82d8
commit
2e1bdb9491
|
@ -90,8 +90,8 @@ class Field:
|
||||||
context['obj'] = ('tied' in ctx) and ctx['tied'] or ctx['obj']
|
context['obj'] = ('tied' in ctx) and ctx['tied'] or ctx['obj']
|
||||||
context['zobj'] = context['obj'].o
|
context['zobj'] = context['obj'].o
|
||||||
# Copy some keys from the context of the currently executed PX.
|
# Copy some keys from the context of the currently executed PX.
|
||||||
for k in ('tool', 'ztool', 'req', '_', 'q', 'url', 'dright', 'dleft', \
|
for k in ('tool', 'ztool', 'req', '_', 'q', 'url', 'dir', 'dright',
|
||||||
'inPopup'):
|
'dleft', 'inPopup'):
|
||||||
if k in context: continue
|
if k in context: continue
|
||||||
context[k] = ctx[k]
|
context[k] = ctx[k]
|
||||||
return self.pxRender(context).encode('utf-8')
|
return self.pxRender(context).encode('utf-8')
|
||||||
|
|
|
@ -129,9 +129,11 @@ class String(Field):
|
||||||
|
|
||||||
pxMultilingual = Px('''
|
pxMultilingual = Px('''
|
||||||
<!-- Horizontally-layouted multilingual field -->
|
<!-- Horizontally-layouted multilingual field -->
|
||||||
<table if="mLayout == 'horizontal'" width="100%">
|
<table if="mLayout == 'horizontal'" width="100%"
|
||||||
|
var="count=len(field.languages)">
|
||||||
<tr valign="top"><x for="lg in field.languages"><x>:field.pxLanguage</x>
|
<tr valign="top"><x for="lg in field.languages"><x>:field.pxLanguage</x>
|
||||||
<td var="requestValue=requestValue[lg]|None;
|
<td width=":'%d%%' % int(100.0/count)"
|
||||||
|
var="requestValue=requestValue[lg]|None;
|
||||||
value=value[lg]|emptyDefault">:field.subPx[layoutType][fmt]</td>
|
value=value[lg]|emptyDefault">:field.subPx[layoutType][fmt]</td>
|
||||||
</x></tr></table>
|
</x></tr></table>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue