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

View File

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