CoreFiles by mySites.guru
admin-item-edit.es6.min.js1 lines, 1,822 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
b88112c9097bbc349f3bea589c9b5c92
sha1
e3ad72c9b8a3a1b2330bffbfd2dd7e4901d98175
sha256
6e45525770b5aeb44369023e4ae998c93ce184581907259a79bdda861e5155c4
(e=>{"use strict";e.submitbutton=((t,n)=>{if("item.setType"===t||"item.setMenuType"===t){if("item.setType"===t){[].slice.call(document.querySelectorAll('#item-form input[name="jform[type]"]')).forEach(e=>{e.value=n}),document.getElementById("fieldtype").value="type"}else{[].slice.call(document.querySelectorAll('#item-form input[name="jform[menutype]"]')).forEach(e=>{e.value=n})}e.submitform("item.setType",document.getElementById("item-form"))}else if("item.cancel"===t||document.formvalidator.isValid(document.getElementById("item-form")))e.submitform(t,document.getElementById("item-form"));else{[].slice.call(document.querySelectorAll("#item-form .modal-value.invalid")).forEach(e=>{const t=e.getAttribute("id").split("").reverse().join(""),n=t.indexOf("_"),o=`${t.substr(n).split("").reverse().join("")}name`;document.getElementById(o).classList.add("invalid")})}});const t=t=>{const n=t.target.value;e.request({url:`index.php?option=com_menus&task=item.getParentItem&menutype=${n}`,headers:{"Content-Type":"application/json"},onSuccess(e){const t=JSON.parse(e);[].slice.call(document.querySelectorAll("#jform_parent_id option")).forEach(e=>{"1"!==e.value&&e.parentNode.removeChild(e)}),t.forEach(e=>{const t=document.createElement("option");t.innerText=e.title,t.id=e.id,document.getElementById("jform_parent_id").appendChild(t)});const n=document.createEvent("HTMLEvents");n.initEvent("change",!0,!1),document.getElementById("jform_parent_id").dispatchEvent(n)},onError:t=>{e.renderMessages(e.ajaxErrorsMessages(t))}})},n=()=>{if(!e||"function"!=typeof e.request)throw new Error("core.js was not properly initialised");const o=document.getElementById("jform_menutype");o&&o.addEventListener("change",t),document.removeEventListener("DOMContentLoaded",n)};document.addEventListener("DOMContentLoaded",n)})(Joomla);

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.