Author: twilight
Date: Wed Nov 12 12:24:25 2008
New Revision: 59887

Modified:
   kukit/kukit.js/branch/simon-bluraction/kukit/dom.js
   kukit/kukit.js/branch/simon-bluraction/kukit/plugin.js
   kukit/kukit.js/branch/simon-bluraction/kukit/selectorreg.js
Log:
Initial, untested commit

Modified: kukit/kukit.js/branch/simon-bluraction/kukit/dom.js
==============================================================================
--- kukit/kukit.js/branch/simon-bluraction/kukit/dom.js (original)
+++ kukit/kukit.js/branch/simon-bluraction/kukit/dom.js Wed Nov 12 12:24:25 2008
@@ -143,6 +143,16 @@
     };
 };
 
+dom.blur = function(node) {
+    tagName = node.tagName.toLowerCase();
+    if ((tagName == 'input') || (tagName == 'select')
+       || (tagName == 'textarea')) {
+        node.blur();
+;;;} else {
+;;;    kukit.logWarning('Blur on node that cannot be blurred !');
+    };
+};
+
 /*
 *  Gets the textual content of the node
 *  if recursive=false (default), does not descend into sub nodes

Modified: kukit/kukit.js/branch/simon-bluraction/kukit/plugin.js
==============================================================================
--- kukit/kukit.js/branch/simon-bluraction/kukit/plugin.js      (original)
+++ kukit/kukit.js/branch/simon-bluraction/kukit/plugin.js      Wed Nov 12 
12:24:25 2008
@@ -882,6 +882,15 @@
 kukit.commandsGlobalRegistry.registerFromAction('focus',
     kukit.cr.makeSelectorCommand);
 
+kukit.actionsGlobalRegistry.register('blur', function(oper) {
+;;; oper.componentName = '[blur] action';
+    // TODO get rid of none
+    oper.evaluateParameters([], {'none': false});
+    kukit.dom.blur(oper.node);
+});
+kukit.commandsGlobalRegistry.registerFromAction('blur',
+    kukit.cr.makeSelectorCommand);
+
 kukit.actionsGlobalRegistry.register('moveNodeAfter', function(oper) {
 ;;; oper.componentName = '[moveNodeAfter] action';
 ;;; oper.evaluateParameters(['html_id'], {});

Modified: kukit/kukit.js/branch/simon-bluraction/kukit/selectorreg.js
==============================================================================
--- kukit/kukit.js/branch/simon-bluraction/kukit/selectorreg.js (original)
+++ kukit/kukit.js/branch/simon-bluraction/kukit/selectorreg.js Wed Nov 12 
12:24:25 2008
@@ -36,9 +36,9 @@
 
 this.check = function(args) {
     // check does not need to be used here actually.
-;;; if (args.length != 1) {
-;;;     throw new Error('internal error, xxxselector() needs 1 argument');
-;;; }
+//;;; if (args.length != 1) {
+//;;;     throw new Error('internal error, xxxselector() needs 1 argument');
+//;;; }
 };
 this.eval = function(args, node, defaultParameters) {
     var f = kukit.selectorTypesGlobalRegistry.get(this.selector_type);
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to