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:
@ -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};
|
||||
}
|
||||
|
Reference in New Issue
Block a user