| Server IP : 172.67.191.97 / Your IP : 104.23.243.197 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/pts/media/com_dpcalendar/js/dpcalendar/layouts/block/ |
Upload File : |
/**
* @package DPCalendar
* @copyright Digital Peak GmbH. <https://www.digital-peak.com>
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/
(function () {
'use strict';
document.addEventListener('DOMContentLoaded', () => {
loadDPAssets(['/com_dpcalendar/js/dpcalendar/layouts/block/select.js']);
[].slice.call(document.querySelectorAll('.dp-timezone__select')).forEach((select) => {
select.addEventListener('change', () => DPCalendar.request('task=profile.tz&tz=' + select.value, () => location.reload()));
if (localStorage.getItem('DPCalendar.timezone.switcher.disable') == 1) {
return;
}
if (Intl.DateTimeFormat().resolvedOptions().timeZone === select.value) {
return;
}
const notification = document.querySelector('.dp-timezone__info');
if (!notification) {
return;
}
notification.innerHTML = notification.innerHTML.replace('%s', Intl.DateTimeFormat().resolvedOptions().timeZone);
notification.classList.remove('dp-timezone__info_hidden');
notification.querySelector('.dp-link_confirm').addEventListener('click', (e) => {
e.preventDefault();
select.value = Intl.DateTimeFormat().resolvedOptions().timeZone;
select.dispatchEvent(new Event('change'));
return false;
});
notification.querySelector('.dp-link_close').addEventListener('click', (e) => {
e.preventDefault();
notification.classList.add('dp-timezone__info_hidden');
localStorage.setItem('DPCalendar.timezone.switcher.disable', 1);
return false;
});
});
});
})();