CoreFiles by mySites.guru
admin-item-edit.min.js1 lines, 1,956 bytes, from Joomla_4.0.0-alpha11-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha10
md5
0df62f9b2f1a5e17f744817ee4955746
sha1
071b524ae229b646e39a8c28568cb14da31d1b56
sha256
4b71f241d2211322dbd4689e1c667e4c1af547c3e446feae1e595ecc3bc87c62
(function(a){'use strict';a.submitbutton=function(b,c){if("item.setType"===b||"item.setMenuType"===b){if("item.setType"===b){var d=[].slice.call(document.querySelectorAll("#item-form input[name=\"jform[type]\"]"));d.forEach(function(a){a.value=c}),document.getElementById("fieldtype").value="type"}else{var e=[].slice.call(document.querySelectorAll("#item-form input[name=\"jform[menutype]\"]"));e.forEach(function(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{var f=[].slice.call(document.querySelectorAll("#item-form .modal-value.invalid"));f.forEach(function(a){var 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")})}};var b=function(b){var c=b.target.value;a.request({url:"index.php?option=com_menus&task=item.getParentItem&menutype=".concat(c),headers:{"Content-Type":"application/json"},onSuccess:function onSuccess(a){var b=JSON.parse(a),c=[].slice.call(document.querySelectorAll("#jform_parent_id option"));c.forEach(function(a){"1"!==a.value&&a.parentNode.removeChild(a)}),b.forEach(function(a){var b=document.createElement("option");b.innerText=a.title,b.id=a.id,document.getElementById("jform_parent_id").appendChild(b)});var d=document.createEvent("HTMLEvents");d.initEvent("change",!0,!1),document.getElementById("jform_parent_id").dispatchEvent(d)},onError:function onError(b){a.renderMessages(a.ajaxErrorsMessages(b))}})},c=function(){if(!a||"function"!=typeof a.request)throw new Error("core.js was not properly initialised");var 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.