aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-09 12:41:55 -0600
committerGitHub2020-12-09 12:41:55 -0600
commit69f3e56b1d0425f35cd9baa75b3cf3a42c876305 (patch)
tree466f44ed427c223fa3c75f90ec0fbb67d590bd16 /wqflask
parentc121a05189e6aef66da676351677726d6f567b88 (diff)
parent4e3537b9e7525ea7a886cd12205bc40a53c5046a (diff)
downloadgenenetwork2-69f3e56b1d0425f35cd9baa75b3cf3a42c876305.tar.gz
Merge pull request #499 from Alexanderlacuna/feature/auto-hide-column
Feature/hide empty column
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/auto_hide_column.js21
-rw-r--r--wqflask/wqflask/templates/show_trait_calculate_correlations.html2
2 files changed, 22 insertions, 1 deletions
diff --git a/wqflask/wqflask/static/new/javascript/auto_hide_column.js b/wqflask/wqflask/static/new/javascript/auto_hide_column.js
new file mode 100644
index 00000000..1a4dc039
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/auto_hide_column.js
@@ -0,0 +1,21 @@
+ function filterDatatable(datatable){
+ let invalidColumns=[]
+ let columnCount=datatable.columns().header().length;
+ let numberOfRows=datatable.rows().count();
+ for (let col=0; col<columnCount; col++){
+ colObj = datatable.column(col).nodes().to$();
+ allNAs = true;
+ for (let i=0;i<numberOfRows;i++){
+ cellContent = colObj[i].childNodes[0].data
+ if (cellContent != "N/A" && cellContent != ""){
+ allNAs = false;
+ break;
+ }
+ }
+ if (allNAs){
+ invalidColumns.push(col)
+ }
+ }
+ return datatable.columns(invalidColumns).visible(false);
+
+ } \ No newline at end of file
diff --git a/wqflask/wqflask/templates/show_trait_calculate_correlations.html b/wqflask/wqflask/templates/show_trait_calculate_correlations.html
index 4f25e90a..ba72ff27 100644
--- a/wqflask/wqflask/templates/show_trait_calculate_correlations.html
+++ b/wqflask/wqflask/templates/show_trait_calculate_correlations.html
@@ -38,7 +38,7 @@
</div>
<div class="form-group">
- <label for="corr_return_results" class="col-xs-2 control-label">Return</label>
+ <label for="corr_return_results" class="col-xs-2 control-label">Limit to</label>
<div class="col-xs-4 controls">
<select name="corr_return_results" class="form-control">
{% for return_result in corr_tools.return_results_menu %}