Server IP : 195.201.23.43 / Your IP : 18.191.234.43 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/kdecoratie/public_html/media/fef/js/ |
Upload File : |
/** * @package AkeebaFEF * @copyright Copyright (c)2017-2018 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ if (typeof akeeba === 'undefined') { akeeba = {}; } if (typeof akeeba.fef === 'undefined') { akeeba.fef = {}; } if (typeof akeeba.fef.forEach === 'undefined') { akeeba.fef.forEach = function (array, callback, scope) { for (var i = 0; i < array.length; i++) { callback.call(scope, i, array[i]); } }; } /** * Activates the tab interface for specific HTML elements * * @param {String} [selector] CSS selector for the tab-set wrapper(s). Default: 'div.akeeba-tabs' */ akeeba.fef.tabs = function(selector) { // Use the default selector, if necessary if ((typeof selector === 'undefined') || (selector === '')) { selector = 'div.akeeba-tabs'; } var wrappersList = document.querySelectorAll(selector); if (wrappersList.length === 0) { return; } // Loop for every tab set matching the selector akeeba.fef.forEach(wrappersList, function(i, elWrapper) { // Sort the child elements of the selector to tabs (label) and panels (section) var tabList = elWrapper.querySelectorAll('label'); var tabId = elWrapper.id; var tabPreselected = ''; if (tabList.length === 0) { return; } if (tabId != '') { tabPreselected = window.sessionStorage.getItem('akeeba.tabs.' + tabId); } akeeba.fef.forEach(tabList, function(k, elTab) { if (elTab.parentElement !== elWrapper) { return; } elTab.addEventListener('click', function (event) { var selectedId = this.getAttribute('for'); akeeba.fef.forEach(tabList, function(q, element) { if (element.parentElement !== elWrapper) { return; } var currentClasses = element.className.split(' '); var newClass = ''; for (var property in currentClasses) { if (!currentClasses.hasOwnProperty(property) || (currentClasses[property] === 'active')) { continue; } newClass += currentClasses[property] + ' '; } if (newClass.trim) { newClass = newClass.trim(); } // If the 'for' attribute matches add back the "active" class if (element.getAttribute('for') === selectedId) { window.sessionStorage.setItem('akeeba.tabs.' + tabId, selectedId); newClass += ' active'; } element.className = newClass; }); }); }); if (tabPreselected != '') { akeeba.fef.forEach(tabList, function(k, elTab) { if (elTab.parentElement !== elWrapper) { return; } if (elTab.getAttribute('for') == tabPreselected) { var clickEvent = new MouseEvent('click'); elTab.dispatchEvent(clickEvent); } }); } }); };Private