[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 (function () { 2 'use strict'; 3 4 /** 5 * @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 */ 8 var recursiveApplyChanges = function recursiveApplyChanges(id) { 9 var childs = [].slice.call(document.querySelectorAll("#filter-config select[data-parent=\"" + id + "\"]")); 10 childs.map(function (child) { 11 recursiveApplyChanges(child.dataset.id); 12 child.value = 'NONE'; 13 return child; 14 }); 15 }; 16 17 var applyChanges = function applyChanges(event) { 18 var currentElement = event.currentTarget; 19 var currentFilter = currentElement.options[currentElement.selectedIndex].value; 20 21 if (currentFilter === 'NONE') { 22 var childs = [].slice.call(document.querySelectorAll("#filter-config select[data-parent=\"" + currentElement.dataset.id + "\"]")); 23 24 if (childs.length && window.confirm(Joomla.Text._('COM_CONFIG_TEXT_FILTERS_NOTE'))) { 25 childs.map(function (child) { 26 recursiveApplyChanges(child.dataset.id); 27 child.value = 'NONE'; 28 return child; 29 }); 30 } 31 } 32 }; 33 34 [].slice.call(document.querySelectorAll('#filter-config select')).map(function (select) { 35 return select.addEventListener('change', applyChanges); 36 }); 37 38 })();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |