2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 20:46:47 +00:00

Load stock location pages "on demand"

This commit is contained in:
Oliver Walters 2022-03-19 07:50:37 +11:00
parent 52a0665e32
commit c3ea94827b
2 changed files with 35 additions and 29 deletions

View File

@ -223,6 +223,7 @@
{{ block.super }} {{ block.super }}
{% if category %} {% if category %}
onPanelLoad('parameters', function() {
loadParametricPartTable( loadParametricPartTable(
"#parametric-part-table", "#parametric-part-table",
{ {
@ -230,6 +231,7 @@
data: {{ parameters|safe }}, data: {{ parameters|safe }},
} }
); );
});
$("#toggle-starred").click(function() { $("#toggle-starred").click(function() {
toggleStar({ toggleStar({

View File

@ -202,6 +202,7 @@
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
onPanelLoad('sublocations', function() {
loadStockLocationTable($('#sublocation-table'), { loadStockLocationTable($('#sublocation-table'), {
params: { params: {
{% if location %} {% if location %}
@ -212,6 +213,7 @@
}, },
allowTreeView: true, allowTreeView: true,
}); });
});
linkButtonsToSelection( linkButtonsToSelection(
$('#sublocation-table'), $('#sublocation-table'),
@ -325,6 +327,7 @@
}); });
}); });
onPanelLoad('stock', function() {
loadStockTable($("#stock-table"), { loadStockTable($("#stock-table"), {
buttons: [ buttons: [
'#stock-options', '#stock-options',
@ -339,6 +342,7 @@
}, },
url: "{% url 'api-stock-list' %}", url: "{% url 'api-stock-list' %}",
}); });
});
enableSidebar('stocklocation'); enableSidebar('stocklocation');