From bc0035ebc2a1c69e979814da7a9fb329d29943b0 Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Tue, 15 Oct 2019 08:20:05 +0200 Subject: [PATCH] Added flow if window closing fails If the window could not be closed, the normal flow continues Added comments --- public/viewjs/productform.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/viewjs/productform.js b/public/viewjs/productform.js index 8e75d1c8..22c2b23b 100644 --- a/public/viewjs/productform.js +++ b/public/viewjs/productform.js @@ -67,11 +67,14 @@ } else { + /* If the GET parameter "closeAfterCreation" was passed to the form, it will + automatically close after creating the product. This only works if the window + was opened with javascript */ if (window.location.href.includes("closeAfterCreation")) { window.close(); } - else if (redirectDestination == "reload") + if (redirectDestination == "reload") { window.location.reload(); }