From fe56ee27a08e4b793fed325057f6333090e68da6 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 27 Feb 2014 12:54:05 +0100 Subject: [PATCH] [gen] Bugfixes. --- fields/__init__.py | 8 +++++--- fields/date.py | 6 +++--- fields/pod.py | 5 ++--- fields/string.py | 2 +- gen/mixins/ToolMixin.py | 2 +- gen/tr/fr.po | 2 +- gen/ui/appy.css | 6 +++--- gen/wrappers/ToolWrapper.py | 2 +- gen/wrappers/TranslationWrapper.py | 2 +- gen/wrappers/__init__.py | 2 +- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/fields/__init__.py b/fields/__init__.py index 2bb35f2..969930d 100644 --- a/fields/__init__.py +++ b/fields/__init__.py @@ -42,7 +42,7 @@ class Field: dLayouts = 'lrv-d-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 # in List fields: in this case, fieldName includes the row # index. @@ -409,9 +409,11 @@ class Field: layouts['view'].addCssClasses('focus') layouts['edit'].addCssClasses('focus') # 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 \ - 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(): layouts[layoutType].width = '' # Remove letters "r" from the layouts if the field is not required. diff --git a/fields/date.py b/fields/date.py index 2219f2a..4f2416f 100644 --- a/fields/date.py +++ b/fields/date.py @@ -124,7 +124,7 @@ class Date(Field): monthToName='%s_to_month' % name; yearToName='%s_to_year' % name"> -      +      - + - diff --git a/fields/pod.py b/fields/pod.py index f64104a..eba7c1c 100644 --- a/fields/pod.py +++ b/fields/pod.py @@ -35,7 +35,7 @@ class Pod(Field): 'contact the system administrator.' DELETE_TEMP_DOC_ERROR = 'A temporary document could not be removed. %s.' - pxView = pxCell = Px(''' + pxView = pxCell = Px(''' - ''') + title=":fmt.capitalize()" class="clickable"/>''') pxEdit = pxSearch = '' diff --git a/fields/string.py b/fields/string.py index b0f35d4..c303ba6 100644 --- a/fields/string.py +++ b/fields/string.py @@ -173,7 +173,7 @@ class String(Field): + title=":v[1]">:ztool.truncateValue(v[1], field.swidth)
''') diff --git a/gen/mixins/ToolMixin.py b/gen/mixins/ToolMixin.py index fecf2d7..4a53419 100644 --- a/gen/mixins/ToolMixin.py +++ b/gen/mixins/ToolMixin.py @@ -1263,7 +1263,7 @@ class ToolMixin(BaseMixin): fields that need to be shown on a page displaying query results.''' # Skip this if we are searching multiple content types. 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')] def formatDate(self, aDate, withHour=True): diff --git a/gen/tr/fr.po b/gen/tr/fr.po index 8fabb10..07d1c68 100644 --- a/gen/tr/fr.po +++ b/gen/tr/fr.po @@ -326,7 +326,7 @@ msgstr "XLS (Microsoft Excel)" #. Default: "Welcome to this Appy-powered site." msgid "front_page_text" -msgstr "Bienvenue sur HubSessions pour le Collège communal de Schaerbeek (site 'Additions')." +msgstr "Bienvenue sur ce site fabriqué avec Appy" #. Default: "Please type \"${text}\" (without the double quotes) in the field besides, but without the character at position ${number}." msgid "captcha_text" diff --git a/gen/ui/appy.css b/gen/ui/appy.css index 974d348..9dbd3e7 100644 --- a/gen/ui/appy.css +++ b/gen/ui/appy.css @@ -66,9 +66,9 @@ img { border: 0; vertical-align: middle } background-color: #dbdde1; font-weight: bold } .navigate td { padding: 4px 9px } .login { margin: 3px; color: black } -.button { border-width: 0 !important; color: #666666; height: 23px; width: 150px; - cursor:pointer; font-size: 90%; padding: 1px 0 0 10px; - background-color: transparent !important } +input.button { border-width: 0 !important; color: #666666; height: 23px; + width: 150px; cursor:pointer; font-size: 90%; padding: 1px 0 0 10px; + background-color: transparent !important } .buttons { margin-left: 4px } .message { position: absolute; top: -40px; left: 50%; font-size: 90%; width: 600px; border: 1px #F0C36D solid; padding: 6px; diff --git a/gen/wrappers/ToolWrapper.py b/gen/wrappers/ToolWrapper.py index 079f36b..7dc4c6f 100644 --- a/gen/wrappers/ToolWrapper.py +++ b/gen/wrappers/ToolWrapper.py @@ -441,7 +441,7 @@ class ToolWrapper(AbstractWrapper): if="zobjects and fields" align=":dright"> :field.pxView + for="field in fields">:field.pxRender diff --git a/gen/wrappers/TranslationWrapper.py b/gen/wrappers/TranslationWrapper.py index 5fc363e..322a87b 100644 --- a/gen/wrappers/TranslationWrapper.py +++ b/gen/wrappers/TranslationWrapper.py @@ -33,7 +33,7 @@ class TranslationWrapper(AbstractWrapper): sourceMsg = sourceMsg.replace('<','<').replace('>','>') sourceMsg = sourceMsg.replace('\n', '
') return '
' \ + 'style="margin-right: 5px">' \ '%s
' % (fieldName, sourceMsg) def show(self, field): diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index 7c836eb..02e142b 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -189,7 +189,7 @@ class AbstractWrapper(object): - +