diff options
author | zsloan | 2022-08-20 18:41:12 +0000 |
---|---|---|
committer | zsloan | 2022-08-20 18:44:59 +0000 |
commit | c33ac9566645b08370a8a85f8a3df5d0c8c66f28 (patch) | |
tree | cbe215ff31cea2c970ef225a9a724ef519e6c13d | |
parent | 9f3bae5e4a59112eab7498acade0ed7011fcfffd (diff) | |
download | genenetwork2-c33ac9566645b08370a8a85f8a3df5d0c8c66f28.tar.gz |
Fix JS for opening new tabs (or not) for collection page tools/options
-rw-r--r-- | wqflask/wqflask/templates/collections/view.html | 13 |
1 files changed, 7 insertions, 6 deletions
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 @@ <h3>This collection has {{ '{}'.format(numify(trait_obs|count, "record", "records")) }}</h3> <div class="tool-button-container"> - <form id="collection_form" action="/delete" method="post" target="_blank"> + <form id="collection_form" action="/delete" method="post"> <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" /> <input type="hidden" name="collection_name" id="collection_name" value="{{ uc.name }}" /> <input type="hidden" name="tool_used" value="" /> @@ -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() { |