diff options
-rw-r--r-- | wqflask/wqflask/static/new/javascript/auto_hide_column.js | 21 | ||||
-rw-r--r-- | wqflask/wqflask/templates/show_trait_calculate_correlations.html | 2 |
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 %} |