From 8b90d877a8d4e9a1a934fa7f01708675118f9f37 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Tue, 17 Feb 2015 08:58:04 +0100 Subject: [PATCH] [gen] Bugfixes. --- fields/calendar.py | 37 ++++++++++++++++++------------------- fields/group.py | 2 +- fields/pod.py | 17 ++++++++++++++--- fields/ref.py | 10 ++++------ fields/search.py | 14 ++++++-------- fields/string.py | 16 +++++++++------- gen/__init__.py | 4 +++- gen/mixins/ToolMixin.py | 14 +------------- gen/ui/appy.js | 8 ++++++++ gen/ui/calendar.js | 14 ++++++++++++-- gen/wrappers/UserWrapper.py | 4 ++-- gen/wrappers/__init__.py | 26 ++++++++++++++------------ 12 files changed, 92 insertions(+), 74 deletions(-) diff --git a/fields/calendar.py b/fields/calendar.py index cdceec1..36b323e 100644 --- a/fields/calendar.py +++ b/fields/calendar.py @@ -12,14 +12,15 @@ class Calendar(Field): '''This field allows to produce an agenda (monthly view) and view/edit events on it.''' jsFiles = {'view': ('calendar.js',)} + DateTime = DateTime # Month view for a calendar. Called by pxView, and directly from the UI, # via Ajax, when the user selects another month. - pxMonthView = Px(''' + pxViewMonth = Px('''
- +
+ dayString=date.strftime('%Y/%m/%d'); + js=mayEdit and 'toggleVisibility(this, %s)' % q('img') \ + or ''" + style=":date.isCurrentDay() and 'font-weight:bold' or \ + 'font-weight:normal'" + class=":cssClasses" onmouseover=":js" onmouseout=":js"> :day :_('month_%s_short' % date.aMonth()) @@ -138,11 +137,11 @@ class Calendar(Field):