Author: gotcha
Date: Mon Mar 12 13:57:38 2007
New Revision: 40326

Modified:
   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/interfaces.py
Log:
server-side support for focus


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 Mar 12 
13:57:38 2007
@@ -1,9 +1,8 @@
-from interfaces import IKSSCoreCommands
 from kss.core.selectors import Selector, CssSelector, HtmlIdSelector
 from kss.core.selectors import ParentNodeSelector, SameNodeSelector
 from kss.core.azaxview import CommandSet
 from kss.core.deprecated import deprecated
-from kss.core.parsers import XmlParser, HtmlParser
+from kss.core.parsers import HtmlParser
 from kss.core.plugins.core.interfaces import IKSSCoreCommands
 from zope.interface import implements
 
@@ -125,6 +124,10 @@
         command = self.commands.addCommand('toggleClass', selector)
         data = command.addParam('classname', classname)
 
+    def focus(self, selector):
+        """ see interfaces.py """
+        command = self.commands.addCommand('focus', selector)
+
     # XXX Deprecated ones
 
     def moveChildrenTo(self, selector, id):

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 Mar 12 
13:57:38 2007
@@ -252,6 +252,11 @@
         />
 
     <kss:action
+        name="focus"
+        command_factory="selector"
+        />
+
+    <kss:action
         name="setStateVar"
         command_factory="global"
         params_mandatory="varname value"

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 Mar 12 
13:57:38 2007
@@ -82,3 +82,6 @@
         
         If the class is present it will be removed. Else the class will be
         added.  """
+
+    def focus(selector):
+        """Set focus to selected node."""
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to