- md5
- f676ac078e6b4b429576d9e39b5a5f27
- sha1
- ba63c0b86977eab5c7523c0469b59b74f4af99f5
- sha256
- 933d0af42c9ff7b7d2ee036b17a03ef1516b92a39f5719176adc2c6fa7b54758
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @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.