[ 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) 2018 Open Source Matters, Inc. <https://www.joomla.org> 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 */ 8 (function (document) { 9 var updateBannerFields = function updateBannerFields(value) { 10 var imgWrapper = document.getElementById('image'); 11 var custom = document.getElementById('custom'); 12 13 switch (value) { 14 case '0': 15 // Image 16 imgWrapper.classList.remove('hidden'); 17 custom.classList.add('hidden'); 18 break; 19 20 case '1': 21 // Custom 22 imgWrapper.classList.add('hidden'); 23 custom.classList.remove('hidden'); 24 break; 25 } 26 }; 27 28 document.addEventListener('DOMContentLoaded', function () { 29 var jformType = document.getElementById('jform_type'); 30 31 if (jformType) { 32 // Hide/show parameters initially 33 updateBannerFields(jformType.value); // Hide/show parameters when the type has been selected 34 35 jformType.addEventListener('change', function (_ref) { 36 var target = _ref.target; 37 updateBannerFields(target.value); 38 }); 39 } 40 }); 41 })(document); 42 43 })();
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 |