CoreFiles by mySites.guru
template.min.js5 lines, 4,838 bytes, from Joomla_6.2.1-Stable-Full_Package.zip
Raw History Compare with 6.2.0
md5
e55c5c5516a50182a9b2bbeab3abb73f
sha1
4b5b173483bfaa6b2fb055589efb5c4d76d9724f
sha256
bc43b511fbfd418b12559270ed2d598ca9456bc08f3171b56eafc22b38377ba0
/**
 * @package     Joomla.Installation
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */(function(){Joomla=window.Joomla||{},Joomla.installation=Joomla.installation||{},Joomla.serialiseForm=function(a){var e,t,l=[],o=a.querySelectorAll("input, select, textarea");for(e=0,t=o.length;e<t;e++){var n=o[e].name,s=o[e].value;n&&((o[e].type==="checkbox"||o[e].type==="radio")&&o[e].checked===!0||o[e].type!=="checkbox"&&o[e].type!=="radio")&&l.push(n.replace("[","%5B").replace("]","%5D")+"="+encodeURIComponent(s))}return l.join("&")},Joomla.goToPage=function(a,e){return e||(Joomla.removeMessages(),document.body.appendChild(document.createElement("joomla-core-loader"))),a&&(window.location=Joomla.baseUrl+"?view="+a+"&layout=default"),!1},Joomla.submitform=function(a){var e=Joomla.serialiseForm(a);return document.body.appendChild(document.createElement("joomla-core-loader")),Joomla.removeMessages(),Joomla.request({type:"POST",url:Joomla.baseUrl,data:e,dataType:"json",onSuccess:function(t,l){t=JSON.parse(t);var o=document.querySelector("joomla-core-loader");t.messages&&Joomla.renderMessages(t.messages),t.error?(Joomla.renderMessages({error:[t.message]}),o.parentNode.removeChild(o)):(o.parentNode.removeChild(o),t.data&&t.data.view&&Install.goToPage(t.data.view,!0))},onError:function(t){var l=document.querySelector("joomla-core-loader");l.parentNode.removeChild(l),busy=!1;try{var o=JSON.parse(t.responseText);Joomla.replaceTokens(o.token),alert(o.message)}catch{}}}),!1},Joomla.scrollTo=function(a,e){var t=a.scrollTop;if(t+=(e-t)*.3,Math.abs(t-e)<2){a.scrollTop=e;return}a.scrollTop=t,setTimeout(Joomla.scrollTo,40,a,e)},Joomla.checkFormField=function(a){var e=[];return a.forEach(function(t){e.push(document.formvalidator.validate(document.querySelector(t)))}),!(e.indexOf(!1)>-1)},Joomla.makeRandomDbPrefix=function(){for(var a="0123456789",e="abcdefghijklmnopqrstuvwxyz",t=a+e,l=e[Math.floor(Math.random()*24)],o=0;o<4;o++)l+=t[Math.floor(Math.random()*34)];return document.getElementById("jform_db_prefix").value=l+"_",l+"_"},Joomla.pageInit=function(){return[].slice.call(document.querySelectorAll("form.form-validate")).forEach(function(a){document.formvalidator.attachToForm(a)}),Joomla.installation=Joomla.installation||{},"Loaded..."},Joomla.install=function(a,e,t){const l=document.getElementById("progressbar"),o=document.getElementById("progress-text");if(!e)throw new Error("No form provided");if(!a.length){o&&(o.innerText=Joomla.Text._("INSTL_FINISHED")),setTimeout(Joomla.goToPage,2e3,"remove",t);return}var n=a.shift(),s=Joomla.serialiseForm(e);Joomla.request({method:"POST",url:Joomla.baseUrl+"?task=installation."+n+"&format=json",data:s,perform:!0,onSuccess:function(r,i){try{r=JSON.parse(r)}catch{return o&&(o.setAttribute("role","alert"),o.classList.add("error"),o.innerText=r),console.error("Error in "+n+" Endpoint"),console.error(r),Joomla.renderMessages({error:[Joomla.Text._("INSTL_DATABASE_RESPONSE_ERROR")]}),!1}if(Joomla.replaceTokens(r.token),r.error===!0)return o&&(o.setAttribute("role","alert"),o.classList.add("error"),o.innerText=r.message),r.messages&&Joomla.renderMessages(r.messages),r.message&&Joomla.renderMessages({error:[r.message]}),document.getElementById("installStep3")&&(document.getElementById("installStep3").classList.add("active"),document.getElementById("installStep4").classList.remove("active")),!1;if(r.messages)return Joomla.renderMessages(r.messages),!1;l&&(l.setAttribute("value",parseInt(l.getAttribute("value"))+1),o.innerText=Joomla.Text._("INSTL_IN_PROGRESS")),Joomla.install(a,e,t)},onError:function(r){o&&(o.setAttribute("role","alert"),o.classList.add("error"),o.innerText=r.responseText),Joomla.renderMessages([["",Joomla.Text._("JLIB_DATABASE_ERROR_DATABASE_CONNECT","A Database error occurred.")]]),Joomla.goToPage("remove");try{var i=JSON.parse(r.responseText);Joomla.replaceTokens(i.token),alert(i.message)}catch{}}})},document.addEventListener("DOMContentLoaded",function(){var a=document.getElementById("installer-view");Joomla.baseUrl=Joomla.getOptions("system.installation").url?Joomla.getOptions("system.installation").url.replace(/&amp;/g,"&"):"index.php";var e=document.getElementById("container-installation");if(e)Joomla.installationBaseUrl=e.getAttribute("data-base-url"),Joomla.installationBaseUrl+="installation/index.php";else throw new Error('"container-installation" container is missed');if(a&&a.getAttribute("data-page-name")){var t=document.querySelector('script[src*="/template.js"], script[src*="/template.min.js"]');el=document.createElement("script"),el.src=t.src.replace("/template.","/"+a.getAttribute("data-page-name")+"."),document.head.appendChild(el)}e&&(e.classList.remove("no-js"),e.classList.remove("hidden"))})})();

The same content is in 9 releases, Joomla 6.2.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.