CoreFiles by mySites.guru
default.min.js1 lines, 9,022 bytes, from Joomla_4.2.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 4.2.0-alpha1
md5
5876cfbd7ad0149b600b6bbfb5ad5804
sha1
411a4bda5f665ab687e266e9208930e0d010cf16
sha256
c24682ec06a93cb4466db4ca0b3f6281db8937fdc5765b8a7f7d703ce6fc0f29
Joomla=window.Joomla||{},((e,t)=>{e.submitbuttonUpload=()=>{const a=t.getElementById("uploadForm");""===a.install_package.value?alert(e.Text._("COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE"),!0):a.install_package.files[0].size>a.max_upload_size.value?alert(e.Text._("COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG"),!0):t.getElementById("joomlaupdate-confirm-backup").checked&&a.submit()},e.installpackageChange=()=>{const a=t.getElementById("uploadForm"),i=a.install_package.files[0].size,l=1*i/1024/1024,n=t.getElementById("file_size"),s=t.getElementById("max_upload_size_warn");""===a.install_package.value?(n.classList.add("hidden"),s.classList.add("hidden")):i&&(n.classList.remove("hidden"),n.innerHTML=e.sanitizeHtml(e.Text._("JGLOBAL_SELECTED_UPLOAD_FILE_SIZE").replace("%s",`${l.toFixed(2)} MB`)),i>a.max_upload_size.value?s.classList.remove("hidden"):s.classList.add("hidden"))},t.addEventListener("DOMContentLoaded",(()=>{const a=t.getElementById("uploadForm"),i=t.getElementById("uploadButton"),l=t.getElementById("install_package"),n=t.querySelector(".emptystate-btnadd",t.getElementById("joomlaupdate-wrapper")),s=t.getElementById("joomlaupdate-confirm-backup"),o=n?n.closest("form"):null,r=o?o.querySelector("[name=task]",o):null;i&&(i.addEventListener("click",e.submitbuttonUpload),s.addEventListener("change",(()=>{i.disabled=!s.checked}))),l&&(l.addEventListener("change",e.installpackageChange),l.addEventListener("change",(()=>{const e=a.install_package.files[0].size,t=a.max_upload_size.value;e<=t&&s.disabled?s.disabled=!s.disabled:e<=t&&!s.disabled&&!s.checked?s.disabled=!1:e<=t&&s.checked?(s.checked=!1,i.disabled=!0):e>t&&!s.disabled&&(s.disabled=!s.disabled,s.checked=!1,i.disabled=!0)}))),n&&"#"===n.getAttribute("href")&&r&&n.addEventListener("click",(e=>{e.preventDefault(),s&&!s.checked||(r.value="update.download",o.submit())}))}))})(Joomla,document),((e,t)=>{const a={config:{serverUrl:"index.php?option=com_joomlaupdate&task=update.fetchextensioncompatibility",selector:".extension-check"},STATE:{INCOMPATIBLE:0,COMPATIBLE:1,MISSING_COMPATIBILITY_TAG:2,SERVER_ERROR:3},cleanup:e=>{const a=t.querySelector("#joomlaupdate-precheck-extensions-tab .fa-spinner");let i="success",l="check";switch(e){case"danger":i="danger",l="times";break;case"warning":i="warning",l="exclamation-triangle"}a&&(a.classList.remove("fa-spinner","fa-spin"),a.classList.add(`fa-${l}`,`text-${i}`,"bg-white"));const n=t.querySelector("#compatibilityTable0"),s=t.querySelector("#preupdateCheckWarning");n&&n.classList.add("hidden"),s&&s.classList.add("hidden")},run:()=>{a.nonCoreCriticalPlugins=e.getOptions("nonCoreCriticalPlugins",[]);const i=t.querySelectorAll(a.config.selector);if(0===i.length)return null!==t.getElementById("preupdatecheckbox")&&(t.getElementById("preupdatecheckbox").style.display="none"),null!==t.getElementById("noncoreplugins")&&(t.getElementById("noncoreplugins").checked=!0),[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.remove("disabled"),e.removeAttribute("disabled")})),void a.cleanup();const l=()=>{const a=t.getElementById("noncoreplugins");a.checked?window.confirm(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN_CONFIRM_MESSAGE"))?[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.remove("disabled"),e.removeAttribute("disabled")})):a.checked=!1:[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.add("disabled"),e.setAttribute("disabled","")}))};null!==t.getElementById("noncoreplugins")&&t.getElementById("noncoreplugins").addEventListener("change",l);const n=t.getElementById("joomlaupdate-wrapper");a.joomlaTargetVersion=n.getAttribute("data-joomla-target-version"),a.joomlaCurrentVersion=n.getAttribute("data-joomla-current-version"),[].slice.call(t.querySelectorAll(".compatibilitytoggle")).forEach((t=>{t.addEventListener("click",(()=>{const a=t.closest(".compatibilityTable");"closed"===t.dataset.state?(t.dataset.state="open",t.innerHTML=e.sanitizeHtml(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_LESS_COMPATIBILITY_INFORMATION")),[].slice.call(a.querySelectorAll("table .hidden")).forEach((e=>{e.classList.remove("hidden")}))):(t.dataset.state="closed",t.innerHTML=e.sanitizeHtml(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_MORE_COMPATIBILITY_INFORMATION")),[].slice.call(a.querySelectorAll("table .instver, table .upcomp, table .currcomp")).forEach((e=>{e.classList.add("hidden")})))}))})),[].slice.call(i).forEach((e=>{a.checkCompatibility(e,a.setResultView)}))},checkCompatibility:(t,i)=>{const l={element:t,compatibleVersion:0,serverError:1};e.request({url:`${a.config.serverUrl}&joomla-target-version=${encodeURIComponent(a.joomlaTargetVersion)}&joomla-current-version=${a.joomlaCurrentVersion}&extension-version=${t.getAttribute("data-extension-current-version")}&extension-id=${encodeURIComponent(t.getAttribute("data-extension-id"))}`,onSuccess(e){const t=JSON.parse(e);l.serverError=0,l.compatibilityData=t.data,i(l)},onError(){l.serverError=1,i(l)}})},setResultView:i=>{let l="";if(i.serverError)l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR"),i.compatibilityData={resultGroup:4};else switch(i.compatibilityData.upgradeCompatibilityStatus.state){case a.STATE.COMPATIBLE:if(i.compatibilityData.upgradeWarning){l=`<span class="label label-warning">${e.sanitizeHtml(i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion)}</span>`}else l=!1===i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion?e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"):e.sanitizeHtml(i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion);break;case a.STATE.INCOMPATIBLE:case a.STATE.MISSING_COMPATIBILITY_TAG:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}if(i.element.innerHTML=l,l="",i.serverError)l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR");else switch(i.compatibilityData.currentCompatibilityStatus.state){case a.STATE.COMPATIBLE:l=!1===i.compatibilityData.currentCompatibilityStatus.compatibleVersion?e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"):i.compatibilityData.currentCompatibilityStatus.compatibleVersion;break;case a.STATE.INCOMPATIBLE:case a.STATE.MISSING_COMPATIBILITY_TAG:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:l=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}const n=i.element.getAttribute("data-extension-id");t.getElementById(`available-version-${n}`).innerText=l;const s=t.querySelector(`#compatibilityTable${i.compatibilityData.resultGroup} tbody`);if(s&&s.appendChild(i.element.closest("tr")),t.getElementById(`compatibilityTable${i.compatibilityData.resultGroup}`).classList.remove("hidden"),3===i.compatibilityData.resultGroup&&(a.nonCoreCriticalPlugins=a.nonCoreCriticalPlugins.filter((e=>!(e.package_id.toString()===n||e.extension_id.toString()===n)))),!t.querySelector("#compatibilityTable0 tbody td")){t.getElementById("compatibilityTable0").classList.add("hidden");let i="success";a.nonCoreCriticalPlugins.forEach((a=>{let l=t.querySelector(`td[data-extension-id="${a.extension_id}"]`);if(l||(l=t.querySelector(`td[data-extension-id="${a.package_id}"]`)),l){const t=l.closest("tr");t.classList.add("error");const a=t.querySelector(".exname");a.innerHTML=`${e.sanitizeHtml(a.innerHTML)}\n              <div class="small">\n              <span class="badge bg-warning">\n              <span class="icon-warning"></span>\n              ${e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN")}\n              </span>\n\n              <button type="button" class="btn btn-sm btn-link hasPopover"\n              title="${e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN")} "\n              data-bs-content="${e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN_DESC")} "\n              >\n              ${e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_HELP")}\n              </button>\n              </div>`;const n=a.querySelector(".hasPopover");n&&(n.style.cursor="pointer",new bootstrap.Popover(n,{placement:"top",html:!0,trigger:"focus"})),i="danger"}})),t.querySelector("#compatibilityTable2 tbody td")?i="danger":"danger"!==i&&t.querySelector("#compatibilityTable1 tbody td")&&(i="warning"),0===a.nonCoreCriticalPlugins.length&&"success"===i?(t.getElementById("preupdatecheckbox").style.display="none",t.getElementById("noncoreplugins").checked=!0,[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((e=>{e.classList.remove("disabled"),e.removeAttribute("disabled")}))):a.nonCoreCriticalPlugins.length>0&&t.getElementById("preupdateCheckCompleteProblems").classList.remove("hidden"),a.cleanup(i)}}};null!==t.getElementById("preupdatecheck")&&t.addEventListener("DOMContentLoaded",a.run,!1)})(Joomla,document);

The same content is in 2 releases, Joomla 4.2.0-alpha1 to 4.2.0-alpha2. See them all, or every version of this file.