- md5
- 6973c88e3dcac960ef1bfbe9f6c0658e
- sha1
- 6364e585ccfac3017da46e72141245846bfe7cf5
- sha256
- df5e835f555bece4c6fd6a85441e1ccdc4cef643f203c61523fea95ada484490
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 || {};
(function () {
'use strict';
document.addEventListener('DOMContentLoaded', function () {
// Handle toggle all
[].slice.call(document.querySelectorAll('.filter-toggle-all')).forEach(function (button) {
button.addEventListener('click', function () {
[].slice.call(document.querySelectorAll('.filter-node')).forEach(function (node) {
node.click();
});
});
}); // Update the count
[].slice.call(document.querySelectorAll('.filter-node')).forEach(function () {
var count = document.getElementById('jform_map_count');
if (count) {
count.value = document.querySelectorAll('input[type="checkbox"]:checked').length;
}
}); // Expand/collapse
var expandAccordion = document.getElementById('expandAccordion');
if (expandAccordion) {
expandAccordion.addEventListener('click', function (event) {
event.preventDefault();
var 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(function (element) {
// @todo Remove jQuery!!
window.jQuery(element).collapse('toggle');
});
}
});
}
});
})();
No other release has this exact content. See every version of this file.