aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/templates/collections/list.html12
-rw-r--r--wqflask/wqflask/templates/collections/view.html4
-rw-r--r--wqflask/wqflask/templates/correlation_page.html6
-rw-r--r--wqflask/wqflask/templates/mapping_results.html5
-rw-r--r--wqflask/wqflask/templates/search_result_page.html10
5 files changed, 19 insertions, 18 deletions
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()