aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+});