<script type="text/javascript">
jQuery(function () {
jQuery("#jtree").jstree({
"json_data" : {
"ajax" : {
"url" : "/<?=TDM_ROOT_DIR?>/tdmcore/components/sections/fulltree.php?rd=<?=TDM_ROOT_DIR?>&ulng=<?=$_GET['ulng']?>&brand=<?=urlencode($arResult['BRAND'])?>&mod_id=<?=$arResult['MOD_ID']?>&type_id=<?=$arResult['TYPE_ID']?>&mod_name=<?=urlencode($_REQUEST['mod_name'])?>&type_name=<?=urlencode($_REQUEST['type_name'])?>",
"data" : function (node) {
return { id : node.attr ? node.attr("id") : 0, rs_code : node.attr ? node.attr("rs_code") : '' };
},
"type": "POST"
}
},
"types" : {
"types" : {
"file" : {
"icon":{"image" : "/<?=TDM_ROOT_DIR?>/templates/sections/default/jqtree/file.png"}
}
}
},
"themes" : {"theme" : "default"},
"plugins" : [ "themes", "json_data", "types", "ui" ]
})
.bind("select_node.jstree", function(e, data){var href = data.rslt.obj.attr("href");if(href){window.location=href;}
});
});
jQuery("#jtree").delegate("a","click", function (e){if(this.className.indexOf('icon') == -1){jQuery("#jtree").jstree("toggle_node", this);e.preventDefault();return false;}
});
</script>