grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026/** * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Only define the Joomla namespace if not defined. Joomla = window.Joomla || {}; !(function(document, Joomla) { "use strict"; /** * Sets the HTML of the container-collapse element */ Joomla.setcollapse = function(url, name, height) { if (!document.getElementById('collapse-' + name)) { document.getElementById('container-collapse').innerHTML = '
'; } }; /** * IE8 polyfill for indexOf() */ if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt) { var len = this.length >>> 0; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) { from += len; } for (; from < len; from++) { if (from in this && this[from] === elt) { return from; } } return -1; }; } /** * JField 'showon' feature. */ window.jQuery && (function($) { /** * Method to check condition and change the target visibility * @param {jQuery} target * @param {Boolean} animate */ function linkedoptions(target, animate) { var showfield = true, jsondata = target.data('showon') || [], itemval, condition, fieldName, $fields; // Check if target conditions are satisfied for (var j = 0, lj = jsondata.length; j < lj; j++) { condition = jsondata[j] || {}; fieldName = condition.field; $fields = $('[name="' + fieldName + '"], [name="' + fieldName + '[]"]'); condition['valid'] = 0; // Test in each of the elements in the field array if condition is valid $fields.each(function() { var $field = $(this); // If checkbox or radio box the value is read from properties if (['checkbox', 'radio'].indexOf($field.attr('type')) !== -1) { if (!$field.prop('checked')) { // unchecked fields will return a blank and so always match a != condition so we skip them return; } itemval = $field.val(); } else { // select lists, textarea etc. Note that multiple-select list returns an Array here // se we can always tream 'itemval' as an array itemval = $field.val(); // a multi-select