diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/base.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/templates/collections/list.html | 12 | ||||
-rw-r--r-- | wqflask/wqflask/templates/collections/view.html | 4 | ||||
-rw-r--r-- | wqflask/wqflask/templates/correlation_page.html | 6 | ||||
-rw-r--r-- | wqflask/wqflask/templates/mapping_results.html | 5 | ||||
-rw-r--r-- | wqflask/wqflask/templates/search_result_page.html | 10 |
6 files changed, 20 insertions, 19 deletions
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index efaa1c6c..ec500d1e 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -38,7 +38,7 @@ <body style="width: 100%"> <!-- Navbar ================================================== --> - <div class="navbar navbar-inverse navbar-static-top pull-left" role="navigation" style="width: 100%; min-width: 770px; white-space: nowrap;"> + <div class="navbar navbar-inverse navbar-static-top pull-left" role="navigation" style="width: 100%; min-width: 850px; white-space: nowrap;"> <!--<div class="navbar navbar-default" style="width: 100%; white-space: nowrap;">--> <div class="container-fluid" style="width: 100%;"> <!-- Brand and toggle get grouped for better mobile display --> diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html index 2ff7b2fd..0ab54878 100644 --- a/wqflask/wqflask/templates/collections/list.html +++ b/wqflask/wqflask/templates/collections/list.html @@ -76,9 +76,15 @@ $('#trait_table').dataTable( { "drawCallback": function( settings ) { $('#trait_table tr').click(function(event) { - if (event.target.type !== 'checkbox') { - $(':checkbox', this).trigger('click'); - } + 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") + } }); }, "buttons": [ 'copy', 'csv', 'excel' ], diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 66945ed7..8d5e3616 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -148,9 +148,9 @@ var obj =$(this).find('input'); obj.prop('checked', !obj.is(':checked')); } - if ($(this).hasClass("selected")){ + if ($(this).hasClass("selected") && event.target.tagName.toLowerCase() !== 'a'){ $(this).removeClass("selected") - } else { + } else if (event.target.tagName.toLowerCase() !== 'a') { $(this).addClass("selected") } change_buttons() diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index 4a0d70ea..4e3eb393 100644 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -240,13 +240,13 @@ var obj =$(this).find('input'); obj.prop('checked', !obj.is(':checked')); } - if ($(this).hasClass("selected")){ + if ($(this).hasClass("selected") && event.target.tagName.toLowerCase() !== 'a'){ $(this).removeClass("selected") - } else { + } else if (event.target.tagName.toLowerCase() !== 'a') { $(this).addClass("selected") } + change_buttons() }); - $('.trait_checkbox:checkbox').on("change", change_buttons); }, "data": table_json, "columns": [ diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index cfdebde5..1d3c4ff5 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -378,11 +378,12 @@ var obj =$(this).find('input'); obj.prop('checked', !obj.is(':checked')); } - if ($(this).hasClass("selected")){ + if ($(this).hasClass("selected") && event.target.tagName.toLowerCase() !== 'a'){ $(this).removeClass("selected") - } else { + } else if (event.target.tagName.toLowerCase() !== 'a') { $(this).addClass("selected") } + {% if geno_db_exists == "True" %}change_buttons(check_node=1){% endif %} }); }, diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 1a034741..4dbd4308 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -170,12 +170,6 @@ } return params; }; - - $('#trait_table tr').click(function(event) { - if (event.target.type !== 'checkbox') { - $(':checkbox', this).trigger('click'); - } - }); //ZS: Need to make sort by symbol, also need to make sure blank symbol fields at the bottom and symbols starting with numbers below letters trait_table = $('#trait_table').DataTable( { @@ -185,9 +179,9 @@ var obj =$(this).find('input'); obj.prop('checked', !obj.is(':checked')); } - if ($(this).hasClass("selected")){ + if ($(this).hasClass("selected") && event.target.tagName.toLowerCase() !== 'a'){ $(this).removeClass("selected") - } else { + } else if (event.target.tagName.toLowerCase() !== 'a') { $(this).addClass("selected") } change_buttons() |