From 6939fb552617a7494db06b28665d25431610e587 Mon Sep 17 00:00:00 2001 From: Bryan Brancotte Date: Thu, 6 May 2021 08:41:11 +0200 Subject: [PATCH] configurable content of the tooltip, WIP #167 --- js/tree-edam-stand-alone.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/js/tree-edam-stand-alone.js b/js/tree-edam-stand-alone.js index d2a40b7c..ee153bf1 100644 --- a/js/tree-edam-stand-alone.js +++ b/js/tree-edam-stand-alone.js @@ -510,8 +510,15 @@ function interactive_edam_browser(){ .toLowerCase() .replace(/[-]+/g,'-'); var details = build_detail_panel(d, uri, branch_of_term, identifier, false); - fill_detail_panel(d, uri, branch_of_term, identifier, details); - tooltipContainer.node().innerHTML = ''; + if ($("input[name='show-detail']:checked").length) + fill_detail_panel(d, uri, branch_of_term, identifier, details); + else + details.find("tbody.details").parent().remove(); + if ($("input[name='show-community-usage']:checked").length) + fill_community_panel(d, uri, branch_of_term, identifier, details); + else + details.find("tbody.community").parent().remove(); + details.find(".panel-body:empty").remove(); $(tooltipContainer.node()).append(details); }