aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-01-05 15:26:03 -0600
committerzsloan2021-01-05 15:26:03 -0600
commit7474529d86fbd5e21a373a2f96bb2fffe4dea478 (patch)
tree111e7c241e9cb0d36540ec69107b82d03cd513a7 /wqflask
parent0ef495b69d99c53e7a6a216e6748898dbcc79eec (diff)
parente36d40d64c1cf8476002c46b5c9dba308151f75c (diff)
downloadgenenetwork2-7474529d86fbd5e21a373a2f96bb2fffe4dea478.tar.gz
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/init_genome_browser.js2
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js4
-rw-r--r--wqflask/wqflask/templates/mapping_results.html16
3 files changed, 17 insertions, 5 deletions
diff --git a/wqflask/wqflask/static/new/javascript/init_genome_browser.js b/wqflask/wqflask/static/new/javascript/init_genome_browser.js
index 2552fb04..508f5bf2 100644
--- a/wqflask/wqflask/static/new/javascript/init_genome_browser.js
+++ b/wqflask/wqflask/static/new/javascript/init_genome_browser.js
@@ -1,5 +1,3 @@
-console.log("THE FILES:", js_data.browser_files)
-
snps_filename = "/browser_input?filename=" + js_data.browser_files[0]
annot_filename = "/browser_input?filename=" + js_data.browser_files[1]
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js
index 9ffef4f8..05dcfda5 100644
--- a/wqflask/wqflask/static/new/javascript/search_results.js
+++ b/wqflask/wqflask/static/new/javascript/search_results.js
@@ -1,4 +1,4 @@
-change_buttons = function() {
+change_buttons = function(check_node = 0) {
var button, buttons, item, num_checked, text, _i, _j, _k, _l, _len, _len2, _len3, _len4, _results, _results2;
buttons = ["#add", "#remove"];
@@ -6,7 +6,7 @@ change_buttons = function() {
table_api = $('#trait_table').DataTable();
check_cells = table_api.column(0).nodes().to$();
for (let i = 0; i < check_cells.length; i++) {
- if (check_cells[i].childNodes[0].checked){
+ if (check_cells[i].childNodes[check_node].checked){
num_checked += 1
}
}
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index 1a76ef7a..985d542c 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -248,7 +248,7 @@
<button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
<button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
<button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
- <button class="btn btn-success" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
+ {% if geno_db_exists == "True" %}<button class="btn btn-success" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>{% endif %}
<br />
<br />
<div id="table_container" style="width:{% if 'additive' in trimmed_markers[0] %}600{% else %}550{% endif %}px;">
@@ -375,6 +375,20 @@
console.time("Creating table");
{% if selectedChr == -1 %}
$('#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")){
+ $(this).removeClass("selected")
+ } else {
+ $(this).addClass("selected")
+ }
+ {% if geno_db_exists == "True" %}change_buttons(check_node=1){% endif %}
+ });
+ },
"columns": [
{ "type": "natural", "width": "5%" },
{ "type": "natural", "width": "8%" },