как инициировать ajax-обновление jstree?
Гуру! Помогите PLS!!!!
Первоначальная инициализация jstree jQuery(function () { jQuery("#left-content") .jstree({ "json_data" : { "ajax" : { "url" : "$serverside", "data" : function (n) { return { "operation" : "get_children", "idx" : "$form:idx", "id" : n.attr ? n.attr("id").replace("node_","") : 0 }; } } } }) .bind("create.jstree", function (e, data) { data.rslt.obj.each(function () { jQuery.ajax({ async : false, type: 'POST', url: "$serverside", data : { "operation" : "create_node", "id" : data.rslt.parent.attr("id").replace("node_",""), "idx" : "$cookie:idx", "position" : data.rslt.position, "title" : data.rslt.name, "type" : "folder", "attr" : { "rel" : "folder" } }, success : function (r) { if(!r.status) { data.inst.refresh(); } } }); }); ...................... }); Задача перестроить дерево с установкой позиции на определенный nod |
Часовой пояс GMT +3, время: 00:31. |