[gen] Bugfixes.
This commit is contained in:
parent
c002b5cb59
commit
fe56ee27a0
|
@ -42,7 +42,7 @@ class Field:
|
||||||
dLayouts = 'lrv-d-f'
|
dLayouts = 'lrv-d-f'
|
||||||
wLayouts = Table('lrv-f')
|
wLayouts = Table('lrv-f')
|
||||||
|
|
||||||
# Render a field. Optiona vars:
|
# Render a field. Optional vars:
|
||||||
# * fieldName can be given as different as field.name for fields included
|
# * fieldName can be given as different as field.name for fields included
|
||||||
# in List fields: in this case, fieldName includes the row
|
# in List fields: in this case, fieldName includes the row
|
||||||
# index.
|
# index.
|
||||||
|
@ -409,9 +409,11 @@ class Field:
|
||||||
layouts['view'].addCssClasses('focus')
|
layouts['view'].addCssClasses('focus')
|
||||||
layouts['edit'].addCssClasses('focus')
|
layouts['edit'].addCssClasses('focus')
|
||||||
# If layouts are the default ones, set width=None instead of width=100%
|
# If layouts are the default ones, set width=None instead of width=100%
|
||||||
# for the field if it is not in a group (excepted for rich texts).
|
# for the field if it is not in a group (excepted for rich texts and
|
||||||
|
# refs).
|
||||||
if areDefault and not self.group and \
|
if areDefault and not self.group and \
|
||||||
not ((self.type == 'String') and (self.format == self.XHTML)):
|
not ((self.type == 'String') and (self.format == self.XHTML)) and \
|
||||||
|
not (self.type == 'Ref'):
|
||||||
for layoutType in layouts.iterkeys():
|
for layoutType in layouts.iterkeys():
|
||||||
layouts[layoutType].width = ''
|
layouts[layoutType].width = ''
|
||||||
# Remove letters "r" from the layouts if the field is not required.
|
# Remove letters "r" from the layouts if the field is not required.
|
||||||
|
|
|
@ -124,7 +124,7 @@ class Date(Field):
|
||||||
monthToName='%s_to_month' % name;
|
monthToName='%s_to_month' % name;
|
||||||
yearToName='%s_to_year' % name">
|
yearToName='%s_to_year' % name">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>_('search_to')</label> </td>
|
<td><label>:_('search_to')</label> </td>
|
||||||
<td height="20px">
|
<td height="20px">
|
||||||
<select id=":dayToName" name=":dayToName">
|
<select id=":dayToName" name=":dayToName">
|
||||||
<option value="">--</option>
|
<option value="">--</option>
|
||||||
|
@ -142,10 +142,10 @@ class Date(Field):
|
||||||
value=":value">:value</option>
|
value=":value">:value</option>
|
||||||
</select>
|
</select>
|
||||||
<!-- The icon for displaying the calendar popup -->
|
<!-- The icon for displaying the calendar popup -->
|
||||||
<x if="widget.calendar">
|
<x if="field.calendar">
|
||||||
<input type="hidden" id=":toName" name=":toName"/>
|
<input type="hidden" id=":toName" name=":toName"/>
|
||||||
<img id=":'%s_img' % toName" src=":url('calendar.gif')"/>
|
<img id=":'%s_img' % toName" src=":url('calendar.gif')"/>
|
||||||
<script type="text/javascript">::field.getJsInit(toName, years)">
|
<script type="text/javascript">::field.getJsInit(toName, years)
|
||||||
</script>
|
</script>
|
||||||
</x>
|
</x>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -35,7 +35,7 @@ class Pod(Field):
|
||||||
'contact the system administrator.'
|
'contact the system administrator.'
|
||||||
DELETE_TEMP_DOC_ERROR = 'A temporary document could not be removed. %s.'
|
DELETE_TEMP_DOC_ERROR = 'A temporary document could not be removed. %s.'
|
||||||
|
|
||||||
pxView = pxCell = Px('''<x>
|
pxView = pxCell = Px('''
|
||||||
<!-- Ask action -->
|
<!-- Ask action -->
|
||||||
<x if="field.askAction"
|
<x if="field.askAction"
|
||||||
var2="doLabel='%s_askaction' % field.labelId;
|
var2="doLabel='%s_askaction' % field.labelId;
|
||||||
|
@ -46,8 +46,7 @@ class Pod(Field):
|
||||||
<img for="fmt in field.getOutputFormats(zobj)" src=":url(fmt)"
|
<img for="fmt in field.getOutputFormats(zobj)" src=":url(fmt)"
|
||||||
onclick=":'generatePodDocument(%s, %s, %s, %s)' % \
|
onclick=":'generatePodDocument(%s, %s, %s, %s)' % \
|
||||||
(q(zobj.UID()), q(name), q(fmt), q(ztool.getQueryInfo()))"
|
(q(zobj.UID()), q(name), q(fmt), q(ztool.getQueryInfo()))"
|
||||||
title=":fmt.capitalize()" class="clickable"/>
|
title=":fmt.capitalize()" class="clickable"/>''')
|
||||||
</x>''')
|
|
||||||
|
|
||||||
pxEdit = pxSearch = ''
|
pxEdit = pxSearch = ''
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ class String(Field):
|
||||||
<option for="v in field.getPossibleValues(ztool, withTranslations=True,\
|
<option for="v in field.getPossibleValues(ztool, withTranslations=True,\
|
||||||
withBlankValue=False, className=className)"
|
withBlankValue=False, className=className)"
|
||||||
selected=":v[0] in preSelected" value=":v[0]"
|
selected=":v[0] in preSelected" value=":v[0]"
|
||||||
title=":v[1]">ztool.truncateValue(v[1], field.swidth)</option>
|
title=":v[1]">:ztool.truncateValue(v[1], field.swidth)</option>
|
||||||
</select>
|
</select>
|
||||||
</x><br/>
|
</x><br/>
|
||||||
</x>''')
|
</x>''')
|
||||||
|
|
|
@ -1263,7 +1263,7 @@ class ToolMixin(BaseMixin):
|
||||||
fields that need to be shown on a page displaying query results.'''
|
fields that need to be shown on a page displaying query results.'''
|
||||||
# Skip this if we are searching multiple content types.
|
# Skip this if we are searching multiple content types.
|
||||||
if ',' in contentType: return ()
|
if ',' in contentType: return ()
|
||||||
return [f.__dict__ for f in self.getAllAppyTypes(contentType) \
|
return [f for f in self.getAllAppyTypes(contentType) \
|
||||||
if (f.type == 'Pod') and (f.show == 'result')]
|
if (f.type == 'Pod') and (f.show == 'result')]
|
||||||
|
|
||||||
def formatDate(self, aDate, withHour=True):
|
def formatDate(self, aDate, withHour=True):
|
||||||
|
|
|
@ -326,7 +326,7 @@ msgstr "XLS (Microsoft Excel)"
|
||||||
|
|
||||||
#. Default: "Welcome to this Appy-powered site."
|
#. Default: "Welcome to this Appy-powered site."
|
||||||
msgid "front_page_text"
|
msgid "front_page_text"
|
||||||
msgstr "Bienvenue sur HubSessions pour le Collège communal de Schaerbeek (site 'Additions')."
|
msgstr "Bienvenue sur ce site fabriqué avec <a href=\"http://appyframework.org\" target=\"_blank\">Appy</a>"
|
||||||
|
|
||||||
#. Default: "Please type \"${text}\" (without the double quotes) in the field besides, but without the character at position ${number}."
|
#. Default: "Please type \"${text}\" (without the double quotes) in the field besides, but without the character at position ${number}."
|
||||||
msgid "captcha_text"
|
msgid "captcha_text"
|
||||||
|
|
|
@ -66,9 +66,9 @@ img { border: 0; vertical-align: middle }
|
||||||
background-color: #dbdde1; font-weight: bold }
|
background-color: #dbdde1; font-weight: bold }
|
||||||
.navigate td { padding: 4px 9px }
|
.navigate td { padding: 4px 9px }
|
||||||
.login { margin: 3px; color: black }
|
.login { margin: 3px; color: black }
|
||||||
.button { border-width: 0 !important; color: #666666; height: 23px; width: 150px;
|
input.button { border-width: 0 !important; color: #666666; height: 23px;
|
||||||
cursor:pointer; font-size: 90%; padding: 1px 0 0 10px;
|
width: 150px; cursor:pointer; font-size: 90%; padding: 1px 0 0 10px;
|
||||||
background-color: transparent !important }
|
background-color: transparent !important }
|
||||||
.buttons { margin-left: 4px }
|
.buttons { margin-left: 4px }
|
||||||
.message { position: absolute; top: -40px; left: 50%; font-size: 90%;
|
.message { position: absolute; top: -40px; left: 50%; font-size: 90%;
|
||||||
width: 600px; border: 1px #F0C36D solid; padding: 6px;
|
width: 600px; border: 1px #F0C36D solid; padding: 6px;
|
||||||
|
|
|
@ -441,7 +441,7 @@ class ToolWrapper(AbstractWrapper):
|
||||||
if="zobjects and fields" align=":dright">
|
if="zobjects and fields" align=":dright">
|
||||||
<tr>
|
<tr>
|
||||||
<td var="zobj=zobjects[0]; obj=zobj.appy()"
|
<td var="zobj=zobjects[0]; obj=zobj.appy()"
|
||||||
for="field in fields">:field.pxView</td>
|
for="field in fields">:field.pxRender</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class TranslationWrapper(AbstractWrapper):
|
||||||
sourceMsg = sourceMsg.replace('<','<').replace('>','>')
|
sourceMsg = sourceMsg.replace('<','<').replace('>','>')
|
||||||
sourceMsg = sourceMsg.replace('\n', '<br/>')
|
sourceMsg = sourceMsg.replace('\n', '<br/>')
|
||||||
return '<div class="translationLabel"><acronym title="%s" ' \
|
return '<div class="translationLabel"><acronym title="%s" ' \
|
||||||
'style="margin-right: 5px"><img src="help.png"/></acronym>' \
|
'style="margin-right: 5px"><img src="/ui/help.png"/></acronym>' \
|
||||||
'%s</div>' % (fieldName, sourceMsg)
|
'%s</div>' % (fieldName, sourceMsg)
|
||||||
|
|
||||||
def show(self, field):
|
def show(self, field):
|
||||||
|
|
|
@ -189,7 +189,7 @@ class AbstractWrapper(object):
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- The user strip -->
|
<!-- The user strip -->
|
||||||
<tr height="28px">
|
<tr height=":discreetLogin and '5px' or '28px'">
|
||||||
<td>
|
<td>
|
||||||
<table class="userStrip">
|
<table class="userStrip">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in a new issue