Author: twilight
Date: Mon Jan 19 16:19:31 2009
New Revision: 61124
Added:
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/blur.kss
- copied unchanged from r60228,
kukit/kss.core/branch/bluraction/kss/core/plugins/core/demo/commandaction/blur.kss
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/blur.pt
- copied unchanged from r60228,
kukit/kss.core/branch/bluraction/kss/core/plugins/core/demo/commandaction/blur.pt
kukit/kss.core/trunk/kss/core/plugins/core/demo/selenium_tests/ca_blur.html
- copied unchanged from r60228,
kukit/kss.core/branch/bluraction/kss/core/plugins/core/demo/selenium_tests/ca_blur.html
Modified:
kukit/kss.core/trunk/docs/HISTORY.txt
kukit/kss.core/trunk/kss/core/plugins/core/commands.py
kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/commandaction.py
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/configure.zcml
kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
kukit/kss.core/trunk/kss/core/plugins/core/demo/zopeconfig.py
kukit/kss.core/trunk/kss/core/plugins/core/interfaces.py
Log:
Added kss.blur action.
Modified: kukit/kss.core/trunk/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/trunk/docs/HISTORY.txt (original)
+++ kukit/kss.core/trunk/docs/HISTORY.txt Mon Jan 19 16:19:31 2009
@@ -4,6 +4,9 @@
kss.core - 1.5dev Unreleased
+ - Added kss.blur action.
+ [simon]
+
- Avoid dependency on zope.app.zapi package.
[hannosch]
Modified: kukit/kss.core/trunk/kss/core/plugins/core/commands.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/commands.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/commands.py Mon Jan 19
16:19:31 2009
@@ -161,6 +161,10 @@
""" see interfaces.py """
command = self.commands.addCommand('focus', selector)
+ def blur(self, selector):
+ """ see interfaces.py """
+ command = self.commands.addCommand('blur', selector)
+
# XXX Deprecated ones
# BBB until 2007-10-18
Modified: kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml Mon Jan 19
16:19:31 2009
@@ -276,6 +276,11 @@
/>
<kss:action
+ name="blur"
+ command_factory="selector"
+ />
+
+ <kss:action
name="setStateVar"
command_factory="global"
params_mandatory="varname value"
Modified:
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/commandaction.py
==============================================================================
---
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/commandaction.py
(original)
+++
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/commandaction.py
Mon Jan 19 16:19:31 2009
@@ -1,4 +1,4 @@
-from kss.core import KSSView
+from kss.core import KSSView, kssaction
class ActionsView(KSSView):
@@ -26,6 +26,14 @@
self.getCommandSet('core').focus('#' + id)
return self.render()
+ #blur
+
+ @kssaction
+ def blur(self):
+ core = self.getCommandSet('core')
+ samenode = core.getSameNodeSelector()
+ core.blur(samenode)
+
#action-cancel
def toCancel(self):
Modified:
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/configure.zcml
==============================================================================
---
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/configure.zcml
(original)
+++
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/configure.zcml
Mon Jan 19 16:19:31 2009
@@ -61,6 +61,28 @@
permission="zope.View"
/>
+ <!-- blur -->
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ template="blur.pt"
+ name="ca_blur.html"
+ permission="zope.View"
+ />
+
+ <browser:resource
+ file="blur.kss"
+ name="blur.kss"
+ />
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ class=".commandaction.ActionsView"
+ attribute="blur"
+ name="blur"
+ permission="zope.View"
+ />
+
<!-- action-cancel -->
<browser:page
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py Mon Jan 19
16:19:31 2009
@@ -29,6 +29,7 @@
KSSDemo('', 'Core events', "kss_evt_preventbubbling.html",
"Prevent bubbling KSS event parameter"),
KSSDemo('', 'Core events', "kss_keyevents.html", "Key events"),
KSSDemo('', 'Commands/Actions', "ca_focus.html", "Focus"),
+ KSSDemo('', 'Commands/Actions', "ca_blur.html", "Blur"),
KSSDemo('', 'Commands/Actions', "actions.html", "Class actions:
toggle, add, remove"),
KSSDemo('', 'Commands/Actions', "ca_cancel.html", "action-cancel"),
KSSDemo('', 'Commands/Actions', "ca_kssattr.html",
"setKssAttribute"),
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/zopeconfig.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/zopeconfig.py
(original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/zopeconfig.py Mon Jan
19 16:19:31 2009
@@ -38,6 +38,7 @@
KSSDemo('', 'Core events', "kss_evt_preventbubbling.html", "Prevent
bubbling KSS event parameter"),
KSSDemo('', 'Core events', "kss_keyevents.html", "Key events"),
KSSDemo('', 'Commands/Actions', "ca_focus.html", "Focus"),
+ KSSDemo('', 'Commands/Actions', "ca_blur.html", "Blur"),
KSSDemo('', 'Commands/Actions', "actions.html", "Class actions:
toggle, add, remove"),
KSSDemo('', 'Commands/Actions', "ca_cancel.html", "action-cancel"),
KSSDemo('', 'Commands/Actions', "ca_kssattr.html", "setKssAttribute"),
Modified: kukit/kss.core/trunk/kss/core/plugins/core/interfaces.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/interfaces.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/interfaces.py Mon Jan 19
16:19:31 2009
@@ -97,3 +97,6 @@
def focus(selector):
"""Set focus to selected node."""
+
+ def blur(selector):
+ """Remove focus from selected node."""
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins