[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/com_modules/js/ -> admin-module-edit.min.js (source)

   1  Joomla=window.Joomla||{},(n=>{n.submitbutton=e=>{if("module.cancel"===e||document.formvalidator.isValid(document.getElementById("module-form"))){n.submitform(e,document.getElementById("module-form"));const s=n.getOptions("module-edit");if(window.self!==window.top){if(window.parent.viewLevels){const e=document.getElementById("jform_position").value,t=document.getElementById("jform_title").value,a=document.querySelector("#jform_assignment").value,i=document.querySelector("#jform_published").value,o=document.querySelector("#jform_access").value,l=window.parent.document.getElementById(`menus-$s.itemId}`),d=window.parent.document.getElementById(`tr-$s.itemId}`),c=window.parent.document.getElementById(`status-$s.itemId}`);window.parent.inMenus=[],window.parent.numMenus=[].slice.call(document.querySelectorAll('input[name="jform[assigned][]"]')).length,[].slice.call(document.querySelectorAll('input[name="jform[assigned][]"]')).forEach((n=>{a>0&&n.checked&&window.parent.inMenus.push(parseInt(n.value,10)),a<0&&(n.checked||window.parent.inMenus.push(parseInt(n.value,10)))})),"-"===a&&(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-danger">$n.Text._("JNO")}</span>`),d.classList.contains("no")&&0!==d.classList.length||d.classList.add("no")),0===parseInt(a,10)&&(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-info">$n.Text._("JALL")}</span>`),d.classList.contains("no")&&d.classList.remove("no")),parseInt(a,10)>0&&(window.parent.inMenus.indexOf(window.parent.menuId)>=0&&(window.parent.numMenus===window.parent.inMenus.length?(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-info">$n.Text._("JALL")}</span>`),(d.classList.contains("no")||0===d.classList.length)&&d.classList.remove("no")):(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-success">$n.Text._("JYES")}</span>`),d.classList.contains("no")&&d.classList.remove("no"))),window.parent.inMenus.indexOf(window.parent.menuId)<0&&(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-danger">$n.Text._("JNO")}</span>`),d.classList.contains("no")||d.classList.add("no"))),parseInt(a,10)<0&&(window.parent.inMenus.indexOf(window.parent.menuId)>=0&&(window.parent.numMenus===window.parent.inMenus.length?(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-info">$n.Text._("JALL")}</span>`),d.classList.contains("no")&&d.classList.remove("no")):(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-success">$n.Text._("JYES")}</span>`),d.classList.contains("no")&&d.classList.remove("no"))),window.parent.inMenus.indexOf(window.parent.menuId)<0&&(l.innerHTML=n.sanitizeHtml(`<span class="badge bg-danger">$n.Text._("JNO")}</span>`),d.classList.contains("no")&&0!==d.classList.length||d.classList.add("no"))),1===parseInt(i,10)&&(c.innerHTML=n.sanitizeHtml(`<span class="badge bg-success">$n.Text._("JYES")}</span>`),d.classList.contains("unpublished")&&d.classList.remove("unpublished")),0===parseInt(i,10)&&(c.innerHTML=n.sanitizeHtml(`<span class="badge bg-danger">$n.Text._("JNO")}</span>`),d.classList.contains("unpublished")&&0!==d.classList.length||d.classList.add("unpublished")),-2===parseInt(i,10)&&(c.innerHTML=n.sanitizeHtml(`<span class="badge bg-secondary">$n.Text._("JTRASHED")}</span>`),d.classList.contains("unpublished")&&0!==d.classList.length||d.classList.add("unpublished")),document.formvalidator.isValid(document.getElementById("module-form"))&&(window.parent.document.querySelector(`#title-$s.itemId}`).innerText=t,window.parent.document.querySelector(`#position-$s.itemId}`).innerText=e,window.parent.document.querySelector(`#access-$s.itemId}`).innerHTML=n.sanitizeHtml(window.parent.viewLevels[o]))}"module.apply"!==e&&window.parent.Joomla.Modal.getCurrent().close()}}}})(Joomla);


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