From 913d6331c6380016851bf63291a902bc201a4c32 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 25 Oct 2012 10:19:50 -0500 Subject: [PATCH] fixed issue 1104, thanks Paolo Valleri --- VERSION | 2 +- gluon/html.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index f48fdbe8..390d0f22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-10-25 10:11:45) stable +Version 2.2.1 (2012-10-25 10:19:43) stable diff --git a/gluon/html.py b/gluon/html.py index 643d4f1a..648fc405 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -1482,8 +1482,9 @@ class A(DIV): (self['callback'], self['target'] or '', d) self['_href'] = self['_href'] or '#null' elif self['cid']: - self['_onclick'] = 'web2py_component("%s","%s");%sreturn false;' % \ - (self['_href'], self['cid'], d) + pre = self['pre_call'] + ';' if self['pre_call'] else '' + self['_onclick'] = '%sweb2py_component("%s","%s");%sreturn false;' % \ + (pre,self['_href'], self['cid'], d) return DIV.xml(self)