From caf2c395f3aa2dc62236128a0db9f3243170db94 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 17 Aug 2021 03:06:01 +0000 Subject: Add Removal All button that removes all currently added covariates --- wqflask/wqflask/static/new/javascript/show_trait.js | 7 +++++++ wqflask/wqflask/templates/show_trait_mapping_tools.html | 2 ++ 2 files changed, 9 insertions(+) (limited to 'wqflask') 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 @@