[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/com_menus/js/ -> admin-item-edit_modules.min.js (source)

   1  Joomla=window.Joomla||{},(()=>{const e=Joomla.getOptions("menus-edit-modules");e&&(window.viewLevels=e.viewLevels,window.menuId=parseInt(e.itemId,10));const t=document.getElementById("jform_toggle_modules_assigned1"),l=document.getElementById("jform_toggle_modules_assigned0"),o=document.getElementById("jform_toggle_modules_published1"),d=document.getElementById("jform_toggle_modules_published0"),c=[].slice.call(document.getElementsByClassName("module-edit-link")),n=[].slice.call(document.querySelectorAll("#moduleEditModal .modal-footer .btn"));t&&t.addEventListener("click",(()=>{[].slice.call(document.querySelectorAll("tr.no")).forEach((e=>{e.classList.add("table-row"),e.classList.remove("hidden")}))})),l&&l.addEventListener("click",(()=>{[].slice.call(document.querySelectorAll("tr.no")).forEach((e=>{e.classList.add("hidden"),e.classList.remove("table-row")}))})),o&&o.addEventListener("click",(()=>{[].slice.call(document.querySelectorAll(".table tr.unpublished")).forEach((e=>{e.classList.add("table-row"),e.classList.remove("hidden")}))})),d&&d.addEventListener("click",(()=>{[].slice.call(document.querySelectorAll(".table tr.unpublished")).forEach((e=>{e.classList.add("hidden"),e.classList.remove("table-row")}))})),c.length&&c.forEach((e=>{e.addEventListener("click",(({target:e})=>{const t="index.php?option=com_modules&client_id=0&task=module.edit&tmpl=component&view=module&layout=modal&id="+e.getAttribute("data-module-id"),l=document.getElementById("moduleEditModal"),o=l.querySelector(".modal-body"),d=document.createElement("iframe");d.src=t,d.setAttribute("class",'class="iframe jviewport-height70"'),o.innerHTML="",o.appendChild(d),l.open()}))})),n.length&&n.forEach((e=>{e.addEventListener("click",(({target:e})=>{const t=e.getAttribute("data-bs-target");if(t){const e=document.querySelector("#moduleEditModal iframe");(e.contentDocument||e.contentWindow.document).querySelector(t).click()}}))}))})();


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer