From a7316acfe9110ee8b7c1482d3eae613aa5d75d1a Mon Sep 17 00:00:00 2001
From: zsloan
Date: Mon, 28 Sep 2020 13:37:35 -0500
Subject: Changed add to collection to open the collection in a new tab/page so
the results on the initial page aren't lost
* wqflask/wqflask/static/new/javascript/search_results.js - Changed the
add to collection method name to "add_to_collection" because it was
previously "add" which is a terrible method name
* wqflask/wqflask/templates/collections/add.html - Added target="_blank"
to the add to collection form so it will open in a new tab/window
---
wqflask/wqflask/static/new/javascript/search_results.js | 4 ++--
wqflask/wqflask/templates/collections/add.html | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js
index 685d6291..61134a88 100644
--- a/wqflask/wqflask/static/new/javascript/search_results.js
+++ b/wqflask/wqflask/static/new/javascript/search_results.js
@@ -93,7 +93,7 @@ $(function() {
});
- add = function() {
+ add_to_collection = function() {
var traits;
traits = $("#trait_table input:checked").map(function() {
return $(this).val();
@@ -250,7 +250,7 @@ $(function() {
$("#select_all").click(select_all);
$("#deselect_all").click(deselect_all);
$("#invert").click(invert);
- $("#add").click(add);
+ $("#add").click(add_to_collection);
$("#submit_bnw").click(submit_bnw);
$("#export_traits").click(export_traits);
$('.trait_checkbox, .btn').click(change_buttons);
diff --git a/wqflask/wqflask/templates/collections/add.html b/wqflask/wqflask/templates/collections/add.html
index 825dfb84..62b6abb5 100644
--- a/wqflask/wqflask/templates/collections/add.html
+++ b/wqflask/wqflask/templates/collections/add.html
@@ -5,7 +5,7 @@
or add to an existing collection.