From 383af4a687fccbd637d0530c86bfdaaab0027266 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Wed, 11 Sep 2013 22:11:44 +0200 Subject: [PATCH] [gen] BPX bugfixes. --- fields/boolean.py | 2 +- fields/date.py | 12 ++++++------ fields/ref.py | 4 ++-- gen/ui/appy.js | 12 ++++++++++++ gen/wrappers/__init__.py | 11 +---------- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/fields/boolean.py b/fields/boolean.py index dbc91c3..e85958e 100644 --- a/fields/boolean.py +++ b/fields/boolean.py @@ -36,7 +36,7 @@ class Boolean(Field): onclick=":'toggleCheckbox(%s, %s); updateSlaves(this)' % \ (q(name), q('%s_hidden' % name))"/> + value=":isChecked and 'True' or 'False'"/> ''') pxSearch = Px(''' diff --git a/fields/date.py b/fields/date.py index 4b0ca1a..b09db01 100644 --- a/fields/date.py +++ b/fields/date.py @@ -31,8 +31,8 @@ class Date(Field): + selected=":field.isSelected(zobj, 'day', day, \ + rawValue)">:zDay @@ -41,16 +41,16 @@ class Date(Field): + selected=":field.isSelected(zobj, 'month', month, \ + rawValue)">:zMonth diff --git a/fields/ref.py b/fields/ref.py index 0654d1b..c09d619 100644 --- a/fields/ref.py +++ b/fields/ref.py @@ -246,8 +246,8 @@ class Ref(Field): uids=[o.UID() for o in \ field.getLinkedObjects(zobj).objects]; isBeingCreated=zobj.isTemporary()" - name=":name" size="isMultiple and field.height or ''" - multiple="isMultiple and 'multiple' or ''"> + name=":name" size=":isMultiple and field.height or ''" + multiple=":isMultiple">