From d40fc59616865bb8f0dc0e86f510eff82588255b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 17 Sep 2019 10:34:41 +1000 Subject: [PATCH] Reload page after ordering part --- InvenTree/InvenTree/static/css/inventree.css | 8 ++++++++ InvenTree/part/templates/part/orders.html | 7 ++++--- InvenTree/part/templates/part/part_base.html | 8 ++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 812c0ffa51..579803410b 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -1,3 +1,11 @@ +:root { + --primary-color: #335d88; + --secondary-color: #b69c80; + --highlight-color: #f5efe8; + --basic-color: #333; +} + + .qr-code { max-width: 400px; max-height: 400px; diff --git a/InvenTree/part/templates/part/orders.html b/InvenTree/part/templates/part/orders.html index 975a41049a..d3488bea2d 100644 --- a/InvenTree/part/templates/part/orders.html +++ b/InvenTree/part/templates/part/orders.html @@ -10,7 +10,7 @@
- +
@@ -31,11 +31,12 @@ $("#po-table").bootstrapTable({ sortable: true, }); -$("#part-order-2").click(function() { - launchModalForm("/order/purchase-order/order-parts/", { +$("#part-order2").click(function() { + launchModalForm("{% url 'order-parts' %}", { data: { part: {{ part.id }}, }, + reload: true, }); }); diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 8cbae62fec..dfb9b2decf 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -184,8 +184,8 @@ data: { action: "count", part: {{ part.id }}, - reload: true, - } + }, + reload: true, }); }); @@ -225,10 +225,10 @@ }); $("#part-order").click(function() { - launchModalForm("/order/purchase-order/order-parts/", { + launchModalForm("{% url 'order-parts' %}", { data: { part: {{ part.id }}, - }, + } }); });