aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-08-17 03:06:01 +0000
committerzsloan2021-08-19 18:38:54 +0000
commitcaf2c395f3aa2dc62236128a0db9f3243170db94 (patch)
tree8067dd7278203e3f6023903d4742b5c89d9b1a88 /wqflask
parent0b6da486c0480dfe15486de34260ea462b168e39 (diff)
downloadgenenetwork2-caf2c395f3aa2dc62236128a0db9f3243170db94.tar.gz
Add Removal All button that removes all currently added covariates
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js7
-rwxr-xr-xwqflask/wqflask/templates/show_trait_mapping_tools.html2
2 files changed, 9 insertions, 0 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index bacafca6..81c52ff6 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -138,6 +138,13 @@ $(".remove_covariates").click(function () {
$("input[name=covariates]").val(covariates_list.join(","))
});
+$(".remove_all_covariates").click(function() {
+ $(".selected-covariates option").each(function() {
+ $(this).remove();
+ });
+ $("input[name=covariates]").val("");
+})
+
open_trait_selection = function() {
return $('#collections_holder').load('/collections/list?color_by_trait #collections_list', (function(_this) {
return function() {
diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html
index 3f0557aa..cc472914 100755
--- a/wqflask/wqflask/templates/show_trait_mapping_tools.html
+++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html
@@ -76,6 +76,7 @@
<div class="select-covar-div">
<button type="button" class="btn btn-default select-covar-button select_covariates">Select</button>
<button type="button" class="btn btn-default select-covar-button remove_covariates">Remove</button>
+ <button type="button" class="btn btn-default select-covar-button remove_all_covariates" style="width: 95px;">Remove All</button>
</div>
<select size="2" name="selected_covariates_gemma" class="form-control selected-covariates" multiple>
<option value="">No covariates selected</option>
@@ -321,6 +322,7 @@
<div class="select-covar-div">
<button type="button" class="btn btn-default select-covar-button select_covariates">Select</button>
<button type="button" class="btn btn-default select-covar-button remove_covariates">Remove</button>
+ <button type="button" class="btn btn-default select-covar-button remove_all_covariates" style="width: 100px;">Remove All</button>
</div>
<select size="2" name="selected_covariates_rqtl" class="form-control selected-covariates" multiple>
<option value="">No covariates selected</option>