CoreFiles by mySites.guru
admin-item-edit.min.js1 lines, 1,942 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
86400bdd85d2d8c139a5d03a80c43331
sha1
ebb3feff6de9d886ab5d3f76204455a164e381e4
sha256
dae54fb2061d4a06f000b1a1a6334f3885b247161159c0d664a1d8526567a061
(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 e(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 c(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 2 releases, Joomla 4.0.0-alpha6 to 4.0.0-alpha7. See them all, or every version of this file.