aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js
index c5f9fe00..ff2452af 100644
--- a/wqflask/wqflask/static/new/javascript/search_results.js
+++ b/wqflask/wqflask/static/new/javascript/search_results.js
@@ -132,16 +132,23 @@ $(function() {
}
filterByIndex = function() {
- index_string = $('#select_top').val()
- index_set = parseIndexString(index_string)
+ indexString = $('#select_top').val()
+ indexSet = parseIndexString(indexString)
- table_api = $('#trait_table').DataTable();
- check_nodes = table_api.column(0).nodes().to$();
- check_nodes.each(function(index) {
- if (index_set.has(index + 1)){
+ tableApi = $('#trait_table').DataTable();
+ checkNodes = tableApi.column(0).nodes().to$();
+ checkNodes.each(function(index) {
+ if (indexSet.has(index + 1)){
$(this)[0].childNodes[0].checked = true
}
})
+
+ checkRows = tableApi.rows().nodes().to$();
+ checkRows.each(function(index) {
+ if (indexSet.has(index + 1)){
+ $(this)[0].classList.add("selected");
+ }
+ })
}
$(window).keydown(function(event){