CoreFiles by mySites.guru
installer.es6.min.js1 lines, 5,162 bytes, from Joomla_4.0.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta
md5
43a78867b7a778d109bd4caaa2fb2eee
sha1
adece96b335f7320d65db9726d3c67bcb1b155f6
sha256
ec21cefc3809abf01118e44941d5d4f6a8965f045f25c6fef2fa45dc62f0e10f
Joomla=window.Joomla||{},(a=>{'use strict';document.addEventListener("DOMContentLoaded",()=>{a.submitbuttonpackage=()=>{const b=document.getElementById("adminForm");""===b.install_package.value?a.renderMessages({warning:[a.JText._("PLG_INSTALLER_PACKAGEINSTALLER_NO_PACKAGE")]}):b.install_package.files[0].size>b.max_upload_size.value?a.renderMessages({warning:[a.JText._("COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG")]}):(a.displayLoader(),b.installtype.value="upload",b.submit())},a.submitbuttonfolder=()=>{const b=document.getElementById("adminForm");""===b.install_directory.value?a.renderMessages({warning:[a.JText._("PLG_INSTALLER_FOLDERINSTALLER_NO_INSTALL_PATH")]}):(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?a.renderMessages({warning:[a.JText._("PLG_INSTALLER_URLINSTALLER_NO_URL")]}):(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?a.renderMessages({warning:[a.JText._("COM_INSTALLER_MSG_INSTALL_ENTER_A_URL")]}):(a.displayLoader(),b.installtype.value="url",b.submit())},a.submitbutton5=()=>{const b=document.getElementById("adminForm");""!==b.install_url.value||"http://"!==b.install_url.value||"https://"!==b.install_url.value?a.submitbutton4():""===b.install_url.value?a.renderMessages({warning:[a.apps.options.btntxt]}):(document.querySelector("#appsloading").classList.remove("hidden"),b.installtype.value="web",b.submit())},a.submitbuttonUpload=()=>{const b=document.getElementById("uploadForm");""===b.install_package.value?a.renderMessages({warning:[a.JText._("COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE")]}):b.install_package.files[0].size>b.max_upload_size.value?a.renderMessages({warning:[a.JText._("COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG")]}):(a.displayLoader(),b.submit())},a.displayLoader=()=>{const a=document.getElementById("loading");a&&a.classList.remove("hidden")};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.classList.add("hidden"),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").classList.remove("hidden"),void document.querySelector("#uploader-wrapper").classList.add("hidden");let b=!1;const c=document.querySelector("#dragarea"),d=document.querySelector("#install_package"),e=document.querySelector("#max_upload_size").value,f=document.querySelector("#select-file-button"),g=document.querySelector("#installer-return").value,h=document.getElementById("upload-progress"),i=h.querySelectorAll(".bar")[0],j=h.querySelectorAll(".uploading-number")[0];let k="index.php?option=com_installer&task=install.ajax_upload";g&&(k+=`&return=${g}`),f.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 f=d.target.files||d.dataTransfer.files;if(!f.length)return;const g=f[0],h=new FormData;if(g.size>e)return void Joomla.renderMessages({warning:[Joomla.JText._("COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG")]});h.append("install_package",g),h.append("installtype","upload"),c.setAttribute("data-state","uploading"),i.setAttribute("aria-valuenow",0),b=!0,i.style.width=0,j.textContent="0";Joomla.request({url:k,method:"POST",perform:!0,data:h,headers:{"Content-Type":"false"},uploadProgressCallback:a=>{if(a.lengthComputable){const b=a.loaded/a.total,d=Math.round(100*b);i.css("width",`${d}%`),i.setAttribute("aria-valuenow",d),j.textContent=`${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 3 releases, Joomla 4.0.0-beta to 4.0.0-beta3. See them all, or every version of this file.