- md5
- 2bb4a3c5b439443fc2e18faecc8160cd
- sha1
- f003d729eccdb0d4735032f9b1f76418144c69d6
- sha256
- 4e7325cb47faec1ab992bad00d1b4504ac775f564a7bb0e134cb379c71a0b1a1
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
/**
* 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 - 2018 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 = void 0;
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(.in)'));
if (elements) {
elements.forEach(function (element) {
// @todo Remove jQuery!!
window.jQuery(element).collapse('toggle');
});
}
} else {
event.target.innerText = Joomla.JText._('COM_FINDER_FILTER_SHOW_ALL');
elements = [].slice.call(document.querySelectorAll('.collapse.in'));
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.