aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-09-28 13:37:35 -0500
committerzsloan2020-09-28 13:37:35 -0500
commita7316acfe9110ee8b7c1482d3eae613aa5d75d1a (patch)
treec70bef5e11e4d521de547c08a00a0cce0ff44edd
parentd34258bed3ef13350499414100401df3bf08a105 (diff)
downloadgenenetwork2-a7316acfe9110ee8b7c1482d3eae613aa5d75d1a.tar.gz
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
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js4
-rw-r--r--wqflask/wqflask/templates/collections/add.html2
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.</p>
</div>
<div class="modal-body" style="margin-left: 20px;">
- <form action="/collections/new" data-validate="parsley" id="add_form">
+ <form action="/collections/new" target="_blank" data-validate="parsley" id="add_form">
{% if traits is defined %}
<input type="hidden" name="traits" value="{{ traits }}" />
{% else %}