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

The same content is in 4 releases, Joomla 4.0.0-alpha8 to 4.0.0-alpha11. See them all, or every version of this file.