CoreFiles by mySites.guru
template.min.js5 lines, 4,918 bytes, from Joomla_6.2.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 6.2.0-alpha2
md5
d90882cdd3de8952953d2f73884a4448
sha1
56333e0c14d4f3629db33ad29a0e70d3bdad39c6
sha256
d40489239b807da42eef6e76fdd82848a7a6ba28a84e562caed44ee0634f88b5
/**
 * @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,o,l=[],t=a.querySelectorAll("input, select, textarea");for(e=0,o=t.length;e<o;e++){var n=t[e].name,s=t[e].value;n&&((t[e].type==="checkbox"||t[e].type==="radio")&&t[e].checked===!0||t[e].type!=="checkbox"&&t[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(o,l){o=JSON.parse(o);var t=document.querySelector("joomla-core-loader");o.messages&&Joomla.renderMessages(o.messages),o.error?(Joomla.renderMessages({error:[o.message]}),t.parentNode.removeChild(t)):(t.parentNode.removeChild(t),o.data&&o.data.view&&Install.goToPage(o.data.view,!0))},onError:function(o){var l=document.querySelector("joomla-core-loader");l.parentNode.removeChild(l),busy=!1;try{var t=JSON.parse(o.responseText);Joomla.replaceTokens(t.token),alert(t.message)}catch{}}}),!1},Joomla.scrollTo=function(a,e){var o=a.scrollTop;if(o+=(e-o)*.3,Math.abs(o-e)<2){a.scrollTop=e;return}a.scrollTop=o,setTimeout(Joomla.scrollTo,40,a,e)},Joomla.checkFormField=function(a){var e=[];return a.forEach(function(o){e.push(document.formvalidator.validate(document.querySelector(o)))}),!(e.indexOf(!1)>-1)},Joomla.makeRandomDbPrefix=function(){for(var a="0123456789",e="abcdefghijklmnopqrstuvwxyz",o=a+e,l=e[Math.floor(Math.random()*24)],t=0;t<4;t++)l+=o[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,o){const l=document.getElementById("progressbar"),t=document.getElementById("progress-text");if(!e)throw new Error("No form provided");if(!a.length){t&&(t.innerText=Joomla.Text._("INSTL_FINISHED")),setTimeout(Joomla.goToPage,2e3,"remove",o);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 t&&(t.setAttribute("role","alert"),t.classList.add("error"),t.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 t.setAttribute("role","alert"),t.classList.add("error"),t.innerText=r.message,r.messages&&Joomla.renderMessages(r.messages),r.message&&Joomla.renderMessages({error:[r.message]}),document.getElementById("installStep1").classList.add("active"),document.getElementById("installStep2").classList.add("active"),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),t.innerText=Joomla.Text._("INSTL_IN_PROGRESS")),Joomla.install(a,e,o)},onError:function(r){t&&(t.setAttribute("role","alert"),t.classList.add("error"),t.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 o=document.querySelector('script[src*="/template.js"], script[src*="/template.min.js"]');el=document.createElement("script"),el.src=o.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 3 releases, Joomla 6.2.0-alpha1 to 6.2.0-alpha3. See them all, or every version of this file.