2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 07:31:10 +00:00

Revert to bootstrap-treeview

- More "bootstrappy" design
- Already in code base
- Cleaner API
This commit is contained in:
Oliver
2021-12-11 00:08:17 +11:00
parent 3bc3ff493a
commit e9ae3eb01d
20 changed files with 116 additions and 11008 deletions

View File

@@ -247,7 +247,19 @@
enableSidebar('category');
// Enable breadcrumb tree view
enableBreadcrumbTree('category');
enableBreadcrumbTree({
label: 'category',
url: '{% url "api-part-category-tree" %}',
{% if category %}
selected: {{ category.pk }},
{% endif %}
processNode: function(node) {
node.text = node.name;
node.href = `/part/category/${node.pk}/`;
return node;
}
});
loadPartCategoryTable(
$('#subcategory-table'), {

View File

@@ -1066,6 +1066,18 @@
enableSidebar('part');
enableBreadcrumbTree('part');
enableBreadcrumbTree({
label: 'part',
url: '{% url "api-part-category-tree" %}',
{% if part.category %}
selected: {{ part.category.pk }},
{% endif %}
processNode: function(node) {
node.text = node.name;
node.href = `/part/category/${node.pk}/`;
return node;
}
});
{% endblock %}

View File

@@ -20,4 +20,4 @@
{% else %}
{% include 'part/cat_link.html' with category=category %}
{% endif %}
{% endblock %}
{% endblock breadcrumbs %}