diff --git a/static/js/map.js b/static/js/map.js index 4747cf1..151c31a 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -168,6 +168,16 @@ function isa_only(e) { checkbox_change(); } +function show_all_isa(e) { + e.preventDefault(); + var checkbox_list = document.getElementsByClassName('isa-checkbox'); + for (const checkbox of checkbox_list) { + checkbox.checked = true; + } + + checkbox_change(); +} + function checkbox_change() { var checkbox_list = document.getElementsByClassName('isa-checkbox'); var ticked = []; @@ -350,6 +360,8 @@ function load_wikidata_items() { }; +document.getElementById('show-all-isa').onclick = show_all_isa; + var load_btn = document.getElementById('load-btn'); load_btn.onclick = load_wikidata_items; diff --git a/templates/map.html b/templates/map.html index e538b78..805210f 100644 --- a/templates/map.html +++ b/templates/map.html @@ -29,6 +29,7 @@