Author: reebalazs
Date: Thu May 24 21:21:39 2007
New Revision: 43604
Modified:
kukit/kukit.js/branch/ree-stripout-comments/kukit/plugin.js
Log:
Add action moveNodeAsLastChild, and fix continueEvent
since I previously fixed the way orignode and node are propagated
to the commands, this needs to be changed in continueEvent too
and it should use orignode where the parameter is
(previously it was stored in node at this point)
Modified: kukit/kukit.js/branch/ree-stripout-comments/kukit/plugin.js
==============================================================================
--- kukit/kukit.js/branch/ree-stripout-comments/kukit/plugin.js (original)
+++ kukit/kukit.js/branch/ree-stripout-comments/kukit/plugin.js Thu May 24
21:21:39 2007
@@ -754,6 +754,18 @@
});
kukit.commandsGlobalRegistry.registerFromAction('moveNodeBefore',
kukit.cr.makeSelectorCommand);
+kukit.actionsGlobalRegistry.register('moveNodeAsLastChild', function(oper) {
+ ;;; oper.componentname = 'moveNodeAsLastChild action';
+ ;;; oper.completeParms(['html_id'], {});
+ var node = oper.node;
+ // no need to remove it, as insertNode does it anyway
+ // var parentNode = node.parentNode;
+ // parentNode.removeChild(node);
+ var parentNode = document.getElementById(oper.parms.html_id);
+ parentNode.appendChild(node);
+});
+kukit.commandsGlobalRegistry.registerFromAction('moveNodeAsLastChild',
kukit.cr.makeSelectorCommand);
+
kukit.actionsGlobalRegistry.register('copyChildNodesFrom', function(oper) {
;;; oper.componentname = 'copyChildNodesFrom action';
;;; oper.completeParms(['html_id'], {});
@@ -797,7 +809,8 @@
if (parms.allnodes) {
binderinstance.__continue_event_allnodes__(parms.name, actionparms);
} else {
- binderinstance.__continue_event__(parms.name, oper.node, actionparms);
+ // execution happens on the orignode
+ binderinstance.__continue_event__(parms.name, oper.orignode,
actionparms);
}
});
kukit.commandsGlobalRegistry.registerFromAction('continueEvent',
kukit.cr.makeGlobalCommand);
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins