2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Refactor side navigation tree

This commit is contained in:
Oliver Walters
2021-02-28 11:48:20 +11:00
parent 5cdae04c62
commit 6f2ba71339
4 changed files with 81 additions and 69 deletions

View File

@ -11,7 +11,9 @@ InvenTree | Stock
{% endblock %}
{% block sidenav %}
<div id='stock-tree'></div>
<div id='stock-tree'>
{% trans "Loading..." %}
</div>
{% endblock %}
{% block pre_content %}
@ -24,6 +26,7 @@ InvenTree | Stock
{% block js_ready %}
{{ block.super }}
loadTree("{% url 'api-stock-tree' %}",
"#stock-tree",
{
@ -31,10 +34,10 @@ InvenTree | Stock
}
);
$("#toggle-stock-tree").click(function() {
toggleSideNav("#sidenav-left");
return false;
})
initNavTree({
label: 'stock',
treeId: '#sidenav-left',
toggleId: '#toggle-stock-tree',
});
initSideNav();
{% endblock %}