- md5
- 4bcc3e911612b4d4402e697c7340497d
- sha1
- 76c85740b78d94bb6202e7dc0e198cc7090f93bb
- sha256
- 002d5a130fa4c72bbf19cef801ba0c9c363ae3b842593735c1f6b96d1b987fda
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/
/**
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Joomla = window.Joomla || {};
(() => {
'use strict';
document.addEventListener('DOMContentLoaded', () => {
// Handle toggle all
[].slice.call(document.querySelectorAll('.filter-toggle-all')).forEach(button => {
button.addEventListener('click', () => {
[].slice.call(document.querySelectorAll('.filter-node')).forEach(node => {
node.click();
});
});
}); // Update the count
[].slice.call(document.querySelectorAll('.filter-node')).forEach(() => {
const count = document.getElementById('jform_map_count');
if (count) {
count.value = document.querySelectorAll('input[type="checkbox"]:checked').length;
}
}); // Expand/collapse
const expandAccordion = document.getElementById('expandAccordion');
if (expandAccordion) {
expandAccordion.addEventListener('click', event => {
event.preventDefault();
let elements;
if (event.target.innerText === Joomla.JText._('COM_FINDER_FILTER_SHOW_ALL')) {
event.target.innerText = Joomla.JText._('COM_FINDER_FILTER_HIDE_ALL');
elements = [].slice.call(document.querySelectorAll('.collapse:not(.show)'));
} else {
event.target.innerText = Joomla.JText._('COM_FINDER_FILTER_SHOW_ALL');
elements = [].slice.call(document.querySelectorAll('.collapse.show'));
}
if (elements) {
elements.forEach(element => {
// @todo Remove jQuery!!
window.jQuery(element).collapse('toggle');
});
}
});
}
});
})();
No other release has this exact content. See every version of this file.