aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2022-01-18 20:42:44 +0000
committerzsloan2022-01-27 13:45:09 -0600
commit978da92d6fdf6c1f3f9f4c56b963339725921248 (patch)
tree1ba6901238f1cdae5dad63ce1878433bd56eff3a
parent627f86392f082b9a42bd9efeb59e7ee9374932b3 (diff)
downloadgenenetwork2-978da92d6fdf6c1f3f9f4c56b963339725921248.tar.gz
This fixes an issue where you couldn't select more than 150-200 rows when submitting search result traits to a collection; it previously just used JQuery and needed to be changed to use DataTables API to select from rows
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js
index 48b9b7be..9e507123 100644
--- a/wqflask/wqflask/static/new/javascript/search_results.js
+++ b/wqflask/wqflask/static/new/javascript/search_results.js
@@ -132,9 +132,13 @@ $(function() {
add_to_collection = function() {
var traits;
- traits = $("#trait_table input:checked").map(function() {
- return $(this).val();
- }).get();
+ table_api = $('#trait_table').DataTable();
+ check_nodes = table_api.column(0).nodes().to$();
+ traits = Array.from(check_nodes.map(function() {
+ if ($(this)[0].childNodes[0].checked){
+ return $(this)[0].childNodes[0].value
+ }
+ }))
var traits_hash = md5(traits.toString());
@@ -337,4 +341,4 @@ $(function() {
}
apply_default();
-}); \ No newline at end of file
+});