diff options
author | zsloan | 2020-12-15 13:55:24 -0600 |
---|---|---|
committer | zsloan | 2020-12-15 13:55:24 -0600 |
commit | 9a6195abd1867e602234f182d73029e700612bd4 (patch) | |
tree | ee79c48050aa90ae01a700a91e4b3dc6add4b35e /wqflask | |
parent | fde06d3a6b0ea22224f17e179c7ea226e658d02e (diff) | |
download | genenetwork2-9a6195abd1867e602234f182d73029e700612bd4.tar.gz |
Fixed Reset button to also reset hidden rows + changed Hide No Value button to change its text when active
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index e8768325..5dc9e456 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -741,7 +741,6 @@ hide_no_value_filter = function( settings, data, dataIndex ) { } hide_no_value = function() { - tables = ['samples_primary', 'samples_other']; filter_active = $(this).data("active"); for (_i = 0, _len = tables.length; _i < _len; _i++) { @@ -749,9 +748,11 @@ hide_no_value = function() { if ($('#' + table).length) { table_api = $('#' + table).DataTable(); if (filter_active == "true"){ + $(this).val("Hide No Value") table_api.draw(); $(this).data("active", "false"); } else { + $(this).val("Show No Value") $.fn.dataTable.ext.search.push(hide_no_value_filter); table_api.search(); table_api.draw(); @@ -775,6 +776,7 @@ $('#block_outliers').click(block_outliers); reset_samples_table = function() { $('input[name="transform"]').val(""); $('span[name="transform_text"]').text("") + $('#hide_no_value').val("Hide No Value") tables = ['samples_primary', 'samples_other']; for (_i = 0, _len = tables.length; _i < _len; _i++) { table = tables[_i]; @@ -792,6 +794,7 @@ reset_samples_table = function() { this_node.value = this_node.attributes["data-value"].value; } } + table_api.draw(); } } }; |