diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index e9adaf727e..8bc045642c 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -223,13 +223,15 @@ {{ block.super }} {% if category %} - loadParametricPartTable( - "#parametric-part-table", - { - headers: {{ headers|safe }}, - data: {{ parameters|safe }}, - } - ); + onPanelLoad('parameters', function() { + loadParametricPartTable( + "#parametric-part-table", + { + headers: {{ headers|safe }}, + data: {{ parameters|safe }}, + } + ); + }); $("#toggle-starred").click(function() { toggleStar({ diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index 1da0030bc6..45dcc0ba59 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -202,15 +202,17 @@ {% block js_ready %} {{ block.super }} - loadStockLocationTable($('#sublocation-table'), { - params: { - {% if location %} - parent: {{ location.pk }}, - {% else %} - parent: 'null', - {% endif %} - }, - allowTreeView: true, + onPanelLoad('sublocations', function() { + loadStockLocationTable($('#sublocation-table'), { + params: { + {% if location %} + parent: {{ location.pk }}, + {% else %} + parent: 'null', + {% endif %} + }, + allowTreeView: true, + }); }); linkButtonsToSelection( @@ -325,19 +327,21 @@ }); }); - loadStockTable($("#stock-table"), { - buttons: [ - '#stock-options', - ], - params: { - {% if location %} - location: {{ location.pk }}, - {% endif %} - part_detail: true, - location_detail: true, - supplier_part_detail: true, - }, - url: "{% url 'api-stock-list' %}", + onPanelLoad('stock', function() { + loadStockTable($("#stock-table"), { + buttons: [ + '#stock-options', + ], + params: { + {% if location %} + location: {{ location.pk }}, + {% endif %} + part_detail: true, + location_detail: true, + supplier_part_detail: true, + }, + url: "{% url 'api-stock-list' %}", + }); }); enableSidebar('stocklocation');