Author: twilight
Date: Mon Jan 26 12:48:26 2009
New Revision: 61351

Added:
   kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/blur.kss
      - copied unchanged from r61124, 
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/blur.kss
   kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/blur.pt
      - copied unchanged from r61124, 
kukit/kss.core/trunk/kss/core/plugins/core/demo/commandaction/blur.pt
   
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/selenium_tests/ca_blur.html
      - copied unchanged from r61124, 
kukit/kss.core/trunk/kss/core/plugins/core/demo/selenium_tests/ca_blur.html
Modified:
   kukit/kss.core/branch/1.4/docs/HISTORY.txt
   kukit/kss.core/branch/1.4/kss/core/plugins/core/commands.py
   kukit/kss.core/branch/1.4/kss/core/plugins/core/configure.zcml
   
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/commandaction.py
   
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/configure.zcml
   kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/config.py
   kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/zopeconfig.py
   kukit/kss.core/branch/1.4/kss/core/plugins/core/interfaces.py
Log:
Backporting blur action

Modified: kukit/kss.core/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/branch/1.4/docs/HISTORY.txt  (original)
+++ kukit/kss.core/branch/1.4/docs/HISTORY.txt  Mon Jan 26 12:48:26 2009
@@ -4,7 +4,9 @@
 
 kss.core - 1.4dev Unreleased
 
-    - ...
+    - Added kss.blur action.
+      [simon]
+
 
 kss.core - 1.4.4 Released 2009-01-05
 

Modified: kukit/kss.core/branch/1.4/kss/core/plugins/core/commands.py
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/commands.py (original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/commands.py Mon Jan 26 
12:48:26 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/branch/1.4/kss/core/plugins/core/configure.zcml
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/configure.zcml      
(original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/configure.zcml      Mon Jan 
26 12:48:26 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/branch/1.4/kss/core/plugins/core/demo/commandaction/commandaction.py
==============================================================================
--- 
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/commandaction.py
 (original)
+++ 
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/commandaction.py
 Mon Jan 26 12:48:26 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/branch/1.4/kss/core/plugins/core/demo/commandaction/configure.zcml
==============================================================================
--- 
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/configure.zcml
   (original)
+++ 
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/commandaction/configure.zcml
   Mon Jan 26 12:48:26 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/branch/1.4/kss/core/plugins/core/demo/config.py
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/config.py      
(original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/config.py      Mon Jan 
26 12:48:26 2009
@@ -25,6 +25,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/branch/1.4/kss/core/plugins/core/demo/zopeconfig.py
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/zopeconfig.py  
(original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/zopeconfig.py  Mon Jan 
26 12:48:26 2009
@@ -37,6 +37,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",                 
"Focus"),
         KSSDemo('', 'Commands/Actions',     "ca_cancel.html",               
"action-cancel"),
         KSSDemo('', 'Commands/Actions',     "ca_kssattr.html",              
"setKssAttribute"),
         KSSDemo('', 'Commands/Actions',     "actions.html",                 
"Class actions: toggle, add, remove"),

Modified: kukit/kss.core/branch/1.4/kss/core/plugins/core/interfaces.py
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/interfaces.py       
(original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/interfaces.py       Mon Jan 
26 12:48:26 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

Reply via email to