From b07861ddd9805903f8b8ac509d68718481c61c3b Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 12 Feb 2021 21:10:23 +0000 Subject: Fixed row highlighting for Interval Analyst table --- wqflask/wqflask/templates/mapping_results.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index a20b482f..c673ce51 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -7,6 +7,7 @@ + {% endblock %} {% from "base_macro.html" import header %} @@ -415,6 +416,19 @@ } ); {% elif selectedChr != -1 and plotScale =="physic" and (dataset.group.species == 'mouse' or dataset.group.species == 'rat') %} $('#trait_table').dataTable( { + "drawCallback": function( settings ) { + $('#trait_table tr').off().on("click", function(event) { + if (event.target.type !== 'checkbox' && event.target.tagName.toLowerCase() !== 'a') { + var obj =$(this).find('input'); + obj.prop('checked', !obj.is(':checked')); + } + if ($(this).hasClass("selected") && event.target.tagName.toLowerCase() !== 'a'){ + $(this).removeClass("selected") + } else if (event.target.tagName.toLowerCase() !== 'a') { + $(this).addClass("selected") + } + }); + }, "createdRow": function ( row, data, index ) { $('td', row).eq(1).attr("align", "right"); $('td', row).eq(3).attr("align", "right"); -- cgit 1.4.1