[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 /** 2 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 3 * @license GNU General Public License version 2 or later; see LICENSE.txt 4 */ 5 (() => { 6 const onSelect = () => { 7 const batchCategory = document.getElementById('batch-category-id'); 8 const batchMenu = document.getElementById('batch-menu-id'); 9 const batchPosition = document.getElementById('batch-position-id'); 10 const batchGroup = document.getElementById('batch-group-id'); 11 const batchCopyMove = document.getElementById('batch-copy-move'); 12 let batchSelector; 13 14 const onChange = () => { 15 if (!batchSelector.value || batchSelector.value && parseInt(batchSelector.value, 10) === 0) { 16 batchCopyMove.classList.add('hidden'); 17 } else { 18 batchCopyMove.classList.remove('hidden'); 19 } 20 }; 21 22 if (batchCategory) { 23 batchSelector = batchCategory; 24 } 25 26 if (batchMenu) { 27 batchSelector = batchMenu; 28 } 29 30 if (batchPosition) { 31 batchSelector = batchPosition; 32 } 33 34 if (batchGroup) { 35 batchSelector = batchGroup; 36 } 37 38 if (batchCopyMove) { 39 batchCopyMove.classList.add('hidden'); 40 } 41 42 if (batchCopyMove) { 43 batchSelector.addEventListener('change', onChange); 44 } // Cleanup 45 46 47 document.removeEventListener('DOMContentLoaded', onSelect, true); 48 }; // Document loaded 49 50 51 document.addEventListener('DOMContentLoaded', onSelect, true); // Joomla updated 52 53 document.addEventListener('joomla:updated', onSelect, true); 54 })();
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 |