Difference between revisions of "Widget:CrisisCommunicationList"
From LINKS Community Center
Line 271: | Line 271: | ||
async function getInstances() { | async function getInstances() { | ||
const response = await fetch(getQueryUrl(crisisCommsQuery)).then(res => res.json()); | const response = await fetch(getQueryUrl(crisisCommsQuery)).then(res => res.json()); | ||
− | |||
− | |||
return Object.keys(response.query.results).map(pageTitle => { | return Object.keys(response.query.results).map(pageTitle => { | ||
Line 347: | Line 345: | ||
Promise.all([getInstances()]).then(data => { | Promise.all([getInstances()]).then(data => { | ||
const crisisComms = data[0]; | const crisisComms = data[0]; | ||
− | |||
− | |||
// Collect values from instances to use in the filter. | // Collect values from instances to use in the filter. | ||
Line 652: | Line 648: | ||
</div> | </div> | ||
<div class="filter-content" id="type-filter"></div> | <div class="filter-content" id="type-filter"></div> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</div> | </div> | ||
</div> | </div> | ||
Line 685: | Line 670: | ||
</div> | </div> | ||
<div class="filter-content" id="phases-filter"></div> | <div class="filter-content" id="phases-filter"></div> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <div class="filter-wrapper"> | ||
+ | <h4 class="filter-toggle">Language <div class="plus icon"></div></h4> | ||
+ | <div class="filter-container"> | ||
+ | <div class="filter-button-wrapper"> | ||
+ | <button type="button" onclick="selectAll('#language-filter')">Select all</button> | | ||
+ | <button type="button" onclick="deselectAll('#language-filter')">Clear all</button> | ||
+ | </div> | ||
+ | <div class="filter-content" id="language-filter"></div> | ||
</div> | </div> | ||
</div> | </div> |
Revision as of 16:03, 8 September 2023
Current version of the Crisis Communication Library.
Currently in use – do not modify!