From c33ac9566645b08370a8a85f8a3df5d0c8c66f28 Mon Sep 17 00:00:00 2001 From: zsloan Date: Sat, 20 Aug 2022 18:41:12 +0000 Subject: Fix JS for opening new tabs (or not) for collection page tools/options --- wqflask/wqflask/templates/collections/view.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 39df161d..2f385987 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -19,7 +19,7 @@

This collection has {{ '{}'.format(numify(trait_obs|count, "record", "records")) }}

-
+ @@ -242,13 +242,14 @@ submit_special = function(url) { $("#collection_form").attr("action", url); - e.stopImmediatePropagation(); - return $("#collection_form").submit(); + $("#collection_form").attr('target', '_blank').submit(); + return false; }; $("#delete").on("click", function() { url = $(this).data("url") - return submit_special(url) + $("#collection_form").attr("action", url); + return $("#collection_form").removeAttr('target').submit(); }); $("#remove").on("click", function() { @@ -257,8 +258,8 @@ return $(this).val(); }).get(); $("#trait_list").val(traits) - - return submit_special(url) + $("#collection_form").attr("action", url); + return $("#collection_form").removeAttr('target').submit(); }); $("#change_collection_name").on("click", function() { -- cgit v1.2.3