芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.2/com_modules/js/admin-module-edit.min.js
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(`
${n.Text._("JNO")}
`),d.classList.contains("no")&&0!==d.classList.length||d.classList.add("no")),0===parseInt(a,10)&&(l.innerHTML=n.sanitizeHtml(`
${n.Text._("JALL")}
`),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(`
${n.Text._("JALL")}
`),(d.classList.contains("no")||0===d.classList.length)&&d.classList.remove("no")):(l.innerHTML=n.sanitizeHtml(`
${n.Text._("JYES")}
`),d.classList.contains("no")&&d.classList.remove("no"))),window.parent.inMenus.indexOf(window.parent.menuId)<0&&(l.innerHTML=n.sanitizeHtml(`
${n.Text._("JNO")}
`),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(`
${n.Text._("JALL")}
`),d.classList.contains("no")&&d.classList.remove("no")):(l.innerHTML=n.sanitizeHtml(`
${n.Text._("JYES")}
`),d.classList.contains("no")&&d.classList.remove("no"))),window.parent.inMenus.indexOf(window.parent.menuId)<0&&(l.innerHTML=n.sanitizeHtml(`
${n.Text._("JNO")}
`),d.classList.contains("no")&&0!==d.classList.length||d.classList.add("no"))),1===parseInt(i,10)&&(c.innerHTML=n.sanitizeHtml(`
${n.Text._("JYES")}
`),d.classList.contains("unpublished")&&d.classList.remove("unpublished")),0===parseInt(i,10)&&(c.innerHTML=n.sanitizeHtml(`
${n.Text._("JNO")}
`),d.classList.contains("unpublished")&&0!==d.classList.length||d.classList.add("unpublished")),-2===parseInt(i,10)&&(c.innerHTML=n.sanitizeHtml(`
${n.Text._("JTRASHED")}
`),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);