Files
liceo-ariosto/media/legacy/js/toolbar.min.js
2025-06-17 11:53:18 +02:00

1 line
942 B
JavaScript

Joomla=window.Joomla||{},function(t,e){"use strict";t.popupWindow=function(t,e,o,a,s){const n=(screen.width-o)/2,d=`height=${a},width=${o},top=${(screen.height-a)/2},left=${n},scrollbars=${s},resizable`;window.open(t,e,d).window.focus()},e.addEventListener("DOMContentLoaded",(()=>{const t=e.getElementById("toolbar-options"),o=e.getElementById("toolbar-help"),a=e.getElementById("toolbar-inlinehelp");e.querySelectorAll(".js-toolbar-help-btn").forEach((t=>{t.addEventListener("click",(t=>{const e=t.target,o=`height=${parseInt(e.dataset.height,10)},width=${parseInt(e.dataset.width,10)},top=${(window.innerHeight-parseInt(e.dataset.height,10))/2},left=${(window.innerWidth-parseInt(e.dataset.width,10))/2},scrollbars=${"true"===e.dataset.width},resizable`;window.open(e.dataset.url,e.dataset.tile,o).window.focus()}))})),a?a.classList.add("ms-auto"):(o&&!t&&o.classList.add("ms-auto"),t&&!o&&t.classList.add("ms-auto"))}))}(Joomla,document);