ClientJS: Unterstützung für jstree.create_node
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 7 Mar 2013 12:08:22 +0000 (13:08 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 7 Mar 2013 12:12:29 +0000 (13:12 +0100)
SL/ClientJS.pm
js/client_js.js

index 6a458be..51f663f 100644 (file)
@@ -81,6 +81,7 @@ my %supported_methods = (
   'jstree:reopen'        => 1,
 
   # Modifying nodes
+  'jstree:create_node'   => 4,
   'jstree:rename_node'   => 3,
   'jstree:delete_node'   => 2,
   'jstree:move_node'     => 5,
index fa116dd..031b5c8 100644 (file)
@@ -94,6 +94,7 @@ function eval_json_result(data) {
       else if (action[0] == 'jstree:reopen')        $.jstree._reference($(action[1])).reopen();
 
       // Modifying nodes
+      else if (action[0] == 'jstree:create_node')   $.jstree._reference($(action[1])).create_node(action[2], action[3], action[4]);
       else if (action[0] == 'jstree:rename_node')   $.jstree._reference($(action[1])).rename_node(action[2], action[3]);
       else if (action[0] == 'jstree:delete_node')   $.jstree._reference($(action[1])).delete_node(action[2]);
       else if (action[0] == 'jstree:move_node')     $.jstree._reference($(action[1])).move_node(action[2], action[3], action[4], action[5]);