forked from edward/owl-map
Add show all IsA option
This commit is contained in:
parent
7ed3b849e0
commit
50b92760df
|
@ -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;
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<div class="card bg-white visually-hidden mt-3" id="isa-card">
|
||||
<div class="card-body">
|
||||
<div class="h5 card-title">item types</div>
|
||||
<div><a href="#" id="show-all-isa">show all</a></div>
|
||||
<div id="isa-list">
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue