- md5
- 93c646093e4ca047aa7bca6854528c14
- sha1
- 80002f36b86493e655eac1e53ce92da3f7be09f1
- sha256
- 033bcf0c8a712fc9030b82352c0044c555657b8f4c7c141c218dbc923296d25c
Joomla=window.Joomla||{},function(a){'use strict';document.addEventListener("DOMContentLoaded",function(){a.submitbuttonpackage=function(){var 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=function(){var 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=function(){var 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=function(){var 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=function(){var 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=function(){var 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=function(){var a=document.getElementById("loading");a&&a.classList.remove("hidden")};var 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",function(b){b.preventDefault(),a.submitbuttonpackage()})})}(Joomla),document.addEventListener("DOMContentLoaded",function(){function a(a){c.setAttribute("data-state","pending");var 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&&(b=a.message),Joomla.renderMessages({error:[b]})}if("undefined"==typeof FormData)return document.querySelector("#legacy-uploader").classList.remove("hidden"),void document.querySelector("#uploader-wrapper").classList.add("hidden");var b=!1,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],k="index.php?option=com_installer&task=install.ajax_upload";g&&(k+="&return=".concat(g)),f.addEventListener("click",function(){d.click()}),d.addEventListener("change",function(){b||Joomla.submitbuttonpackage()}),c.addEventListener("dragenter",function(a){return a.preventDefault(),a.stopPropagation(),c.classList.add("hover"),!1}),c.addEventListener("dragover",function(a){return a.preventDefault(),a.stopPropagation(),c.classList.add("hover"),!1}),c.addEventListener("dragleave",function(a){return a.preventDefault(),a.stopPropagation(),c.classList.remove("hover"),!1}),c.addEventListener("drop",function(d){if(d.preventDefault(),d.stopPropagation(),!b){c.classList.remove("hover");var f=d.target.files||d.dataTransfer.files;if(f.length){var 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";var l=function(a){if(a.lengthComputable){var b=a.loaded/a.total,d=Math.round(100*b);i.css("width","".concat(d,"%")),i.setAttribute("aria-valuenow",d),j.textContent="".concat(d),100===d&&c.setAttribute("data-state","installing")}};Joomla.request({url:k,method:"POST",perform:!0,data:h,headers:{"Content-Type":"false"},uploadProgressCallback:l,onSuccess:function onSuccess(b){if(!b)return void a(b);var 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:function onError(c){if(b=!1,200===c.status){var d=c.responseText||c.responseJSON;a(d)}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.