CoreFiles by mySites.guru
installer.es6.min.js1 lines, 4,253 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
165d702170a9fff421fda4db3de79ea7
sha1
16880a082835bfb81d448e42a087937b4c399772
sha256
25843f5b56dcff165a331bf4744a0cbd77f3d93d4ea1c3366de8ef957300d50d
Joomla=window.Joomla||{},(a=>{'use strict';document.addEventListener("DOMContentLoaded",()=>{a.submitbuttonpackage=()=>{const b=document.getElementById("adminForm");""===b.install_package.value?alert(a.JText._("PLG_INSTALLER_PACKAGEINSTALLER_NO_PACKAGE"),!0):(a.displayLoader(),b.installtype.value="upload",b.submit())},a.submitbuttonfolder=()=>{const b=document.getElementById("adminForm");""===b.install_directory.value?alert(a.JText._("PLG_INSTALLER_FOLDERINSTALLER_NO_INSTALL_PATH"),!0):(a.displayLoader(),b.installtype.value="folder",b.submit())},a.submitbuttonurl=()=>{const b=document.getElementById("adminForm");""===b.install_url.value||"http://"===b.install_url.value||"https://"===b.install_url.value?alert(a.JText._("PLG_INSTALLER_URLINSTALLER_NO_URL"),!0):(a.displayLoader(),b.installtype.value="url",b.submit())},a.submitbutton4=()=>{const b=document.getElementById("adminForm");""===b.install_url.value||"http://"===b.install_url.value||"https://"===b.install_url.value?alert(a.JText._("COM_INSTALLER_MSG_INSTALL_ENTER_A_URL"),!0):(a.displayLoader(),b.installtype.value="url",b.submit())},a.submitbuttonUpload=()=>{const b=document.getElementById("uploadForm");""===b.install_package.value?alert(a.JText._("COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE"),!0):(a.displayLoader(),b.submit())},a.displayLoader=()=>{const a=document.getElementById("loading");a&&(a.style.display="block")};const b=document.getElementById("loading"),c=document.getElementById("installer-install");b&&c&&(b.style.top=parseInt(c.offsetTop-window.pageYOffset,10),b.style.left=0,b.style.width="100%",b.style.height="100%",b.style.display="none",b.style.marginTop="-10px"),document.getElementById("installbutton_package").addEventListener("click",b=>{b.preventDefault(),a.submitbuttonpackage()})})})(Joomla),document.addEventListener("DOMContentLoaded",()=>{function a(a){c.setAttribute("data-state","pending");let b=Joomla.JText._("PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_ERROR_UNKNOWN");null==a?b=Joomla.JText._("PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_ERROR_EMPTY"):"string"==typeof a?b=a.replace(/(<([^>]+)>|\s+)/g," "):a.message&&({message:b}=a),Joomla.renderMessages({error:[b]})}if("undefined"==typeof FormData)return document.querySelector("#legacy-uploader").style.display="block",void(document.querySelector("#uploader-wrapper").style.display="none");let b=!1;const c=document.querySelector("#dragarea"),d=document.querySelector("#install_package"),e=document.querySelector("#select-file-button"),f=document.querySelector("#installer-return").value,g=document.getElementById("upload-progress"),h=g.querySelectorAll(".bar")[0],i=g.querySelectorAll(".uploading-number")[0];let j="index.php?option=com_installer&task=install.ajax_upload";f&&(j+="&return=".concat(f)),e.addEventListener("click",()=>{d.click()}),d.addEventListener("change",()=>{b||Joomla.submitbuttonpackage()}),c.addEventListener("dragenter",a=>(a.preventDefault(),a.stopPropagation(),c.classList.add("hover"),!1)),c.addEventListener("dragover",a=>(a.preventDefault(),a.stopPropagation(),c.classList.add("hover"),!1)),c.addEventListener("dragleave",a=>(a.preventDefault(),a.stopPropagation(),c.classList.remove("hover"),!1)),c.addEventListener("drop",d=>{if(d.preventDefault(),d.stopPropagation(),b)return;c.classList.remove("hover");const e=d.target.files||d.dataTransfer.files;if(!e.length)return;const f=e[0],g=new FormData;g.append("install_package",f),g.append("installtype","upload"),c.setAttribute("data-state","uploading"),h.setAttribute("aria-valuenow",0),b=!0,h.style.width=0,i.textContent="0";Joomla.request({url:j,method:"POST",perform:!0,data:g,headers:{"Content-Type":"false"},uploadProgressCallback:a=>{if(a.lengthComputable){const b=a.loaded/a.total,d=Math.round(100*b);h.css("width","".concat(d,"%")),h.setAttribute("aria-valuenow",d),i.textContent="".concat(d),100===d&&c.setAttribute("data-state","installing")}},onSuccess:b=>{if(!b)return void a(b);let c;try{c=JSON.parse(b)}catch(b){return void a(b)}return c.success||c.data?void(c.data.redirect?window.location.href=c.data.redirect:window.location.href="index.php?option=com_installer&view=install"):void a(c)},onError:c=>{if(b=!1,200===c.status){const b=c.responseText||c.responseJSON;a(b)}else a(c.statusText)}})})});

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