2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

add stuff to mark starting endpoint

This commit is contained in:
Matthias
2021-12-07 23:54:45 +01:00
parent 2cf4e20d9a
commit 948270bbcb
3 changed files with 33 additions and 4 deletions

View File

@ -153,7 +153,13 @@ function enableSidetree(label) {
$('#tree').jstree({
'core': {
'data': {
'url': '/api/part/category/tree/',
'url': function(node) {
if (node.id == '#') {
var url_parts = String(window.location).split("/").slice(-3);
return `/api/part/category/tree/${url_parts[0]}/${url_parts[1]}/`;
}
return '/api/part/category/tree/'
},
'data': function(node) {
return {'id': node.id};
}