From 81ec1ae39e3032a45ff14a433e42737502d51b5d Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Tue, 15 Oct 2019 00:43:45 +0200 Subject: [PATCH] Add GET parameter to close window after product creation PR for issue #419 This only works when the window was opened by Javascript (eg. from a third party plugin like Barcode Buddy) --- public/viewjs/productform.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/viewjs/productform.js b/public/viewjs/productform.js index eb81f018..8e75d1c8 100644 --- a/public/viewjs/productform.js +++ b/public/viewjs/productform.js @@ -67,7 +67,11 @@ } else { - if (redirectDestination == "reload") + if (window.location.href.includes("closeAfterCreation")) + { + window.close(); + } + else if (redirectDestination == "reload") { window.location.reload(); }