[Checkins] SVN: z3c.formjs/trunk/src/z3c/formjs/js Some fixes to
formjs now that we are working with it again. What a life
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed May 7 10:53:00 EDT 2008
Log message for revision 86529:
Some fixes to formjs now that we are working with it again. What a life
saver!
Changed:
U z3c.formjs/trunk/src/z3c/formjs/jsaction.py
U z3c.formjs/trunk/src/z3c/formjs/jsevent.py
-=-
Modified: z3c.formjs/trunk/src/z3c/formjs/jsaction.py
===================================================================
--- z3c.formjs/trunk/src/z3c/formjs/jsaction.py 2008-05-07 12:53:54 UTC (rev 86528)
+++ z3c.formjs/trunk/src/z3c/formjs/jsaction.py 2008-05-07 14:52:57 UTC (rev 86529)
@@ -180,7 +180,7 @@
buttons = f_locals.setdefault('buttons', button.Buttons())
f_locals['buttons'] += button.Buttons(jsButton)
# Return the handler decorator
- return handler(button)
+ return handler(jsButton)
@zope.interface.implementer(zope.interface.Interface)
@@ -203,6 +203,7 @@
widget.form.jsSubscriptions = jsevent.JSSubscriptions()
zope.interface.alsoProvides(
widget.form, interfaces.IHaveJSSubscriptions)
+
# Step 4: Add the subscription to the form:
for event, handler in handlers:
widget.form.jsSubscriptions.subscribe(event, selector, handler)
Modified: z3c.formjs/trunk/src/z3c/formjs/jsevent.py
===================================================================
--- z3c.formjs/trunk/src/z3c/formjs/jsevent.py 2008-05-07 12:53:54 UTC (rev 86528)
+++ z3c.formjs/trunk/src/z3c/formjs/jsevent.py 2008-05-07 14:52:57 UTC (rev 86529)
@@ -120,6 +120,8 @@
f_locals = frame.f_locals
subs = f_locals.setdefault('jsSubscriptions', JSSubscriptions())
subs.subscribe(event, selector, func)
+ func.__dict__['selector'] = selector
+ func.__dict__['event'] = event
return func
return createSubscription
More information about the Checkins
mailing list