- md5
- e148c9e8adf7307113aace4550fe35d7
- sha1
- eb95efcd212cb34873729b2b61b87c4f21985bf5
- sha256
- d8384982ac6f632037d0575c663794789c02b3c0ac8e90d5dafdbdbcef7d5f7d
!function(){"use strict";Joomla=window.Joomla||{},function(e,t){e.submitbuttonUpload=function(){var l=t.getElementById("uploadForm");""===l.install_package.value?alert(e.Text._("COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE"),!0):l.install_package.files[0].size>l.max_upload_size.value?alert(e.Text._("COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG"),!0):l.submit()},e.installpackageChange=function(){var l=t.getElementById("uploadForm"),a=l.install_package.files[0].size,i=1*a/1024/1024,n=t.getElementById("file_size"),o=t.getElementById("max_upload_size_warn");""===l.install_package.value?(n.classList.add("hidden"),o.classList.add("hidden")):a&&(n.classList.remove("hidden"),n.innerHTML=e.sanitizeHtml(e.Text._("JGLOBAL_SELECTED_UPLOAD_FILE_SIZE").replace("%s",i.toFixed(2)+" MB")),a>l.max_upload_size.value?o.classList.remove("hidden"):o.classList.add("hidden"))},t.addEventListener("DOMContentLoaded",(function(){var e=t.getElementById("uploadButton"),l=t.getElementById("downloadMessage");e&&e.addEventListener("click",(function(){l&&l.classList.remove("hidden")}))}))}(Joomla,document),function(e,t){var l={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},run:function(){[].slice.call(t.querySelectorAll(".settingstoggle")).forEach((function(t){t.style.float="right",t.style.cursor="pointer",t.addEventListener("click",(function(){var l=t.closest("fieldset");"closed"===t.dataset.state?(t.dataset.state="open",t.innerHTML=e.sanitizeHtml(e.getOptions("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_LESS_COMPATIBILITY_INFORMATION")),l.querySelectorAll(".settingsInfo").forEach((function(e){e.classList.remove("hidden")}))):(t.dataset.state="closed",t.innerHTML=e.sanitizeHtml(e.getOptions("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_MORE_COMPATIBILITY_INFORMATION")),l.querySelectorAll(".settingsInfo").forEach((function(e){e.classList.add("hidden")})))}))})),l.nonCoreCriticalPlugins=e.getOptions("nonCoreCriticalPlugins",[]),0===l.nonCoreCriticalPlugins.length&&null!==t.getElementById("updateView")&&(t.getElementById("preupdateCheckWarning").style.display="none",t.getElementById("preupdateconfirmation").style.display="none",t.getElementById("preupdatecheckbox").style.display="none",t.getElementById("preupdatecheckheadings").style.display="none",t.getElementById("preupdatecheckbox").checked=!0,t.getElementById("noncoreplugins").checked=!0,[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")})));var a=t.querySelectorAll(l.config.selector);if(0!==a.length){var i=function(){var l=t.getElementById("preupdatecheckbox").checked,a=t.getElementById("noncoreplugins").checked;l&&a?window.confirm(e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN_CONFIRM_MESSAGE"))?[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")})):(t.getElementById("preupdatecheckbox").checked=!0,t.getElementById("noncoreplugins").checked=!0):[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")}))};null!==t.getElementById("updateView")&&(t.getElementById("preupdatecheckbox").addEventListener("change",i),t.getElementById("noncoreplugins").addEventListener("change",i));var n=t.getElementById("joomlaupdate-wrapper");l.joomlaTargetVersion=n.getAttribute("data-joomla-target-version"),l.joomlaCurrentVersion=n.getAttribute("data-joomla-current-version"),[].slice.call(t.querySelectorAll(".compatibilitytypes img")).forEach((function(e){e.style.height="20px"})),[].slice.call(t.querySelectorAll(".compatibilitytypes")).forEach((function(e){e.style.display="none",e.style.marginLeft=0}));var o=t.getElementById("compatibilitytype0");o&&(o.style.display="block"),[].slice.call(t.querySelectorAll(".compatibilitytoggle")).forEach((function(t){t.style.float="right",t.style.cursor="pointer",t.addEventListener("click",(function(){var a=t.closest("fieldset.compatibilitytypes");"closed"===t.dataset.state?(t.dataset.state="open",t.innerHTML=e.sanitizeHtml(e.getOptions("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_LESS_COMPATIBILITY_INFORMATION")),[].slice.call(a.querySelectorAll(".exname")).forEach((function(e){e.classList.remove("col-md-8"),e.classList.add("col-md-4")})),[].slice.call(a.querySelectorAll(".extype")).forEach((function(e){e.classList.remove("col-md-4"),e.classList.add("col-md-1")})),[].slice.call(a.querySelectorAll(".upcomp")).forEach((function(e){e.classList.remove("hidden"),e.classList.add("col-md-3")})),[].slice.call(a.querySelectorAll(".currcomp")).forEach((function(e){e.classList.remove("hidden"),e.classList.add("col-md-3")})),[].slice.call(a.querySelectorAll(".instver")).forEach((function(e){e.classList.remove("hidden"),e.classList.add("col-md-1")})),l.showyellowwarning&&a.querySelector("#updateyellowwarning")&&a.querySelector("#updateyellowwarning").classList.remove("hidden"),l.showorangewarning&&a.querySelector("#updateorangewarning")&&a.querySelector("#updateorangewarning").classList.remove("hidden")):(t.dataset.state="closed",t.innerHTML=e.sanitizeHtml(e.getOptions("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS_SHOW_MORE_COMPATIBILITY_INFORMATION")),[].slice.call(a.querySelectorAll(".exname")).forEach((function(e){e.classList.add("col-md-8"),e.classList.remove("col-md-4")})),[].slice.call(a.querySelectorAll(".extype")).forEach((function(e){e.classList.add("col-md-4"),e.classList.remove("col-md-1")})),[].slice.call(a.querySelectorAll(".upcomp")).forEach((function(e){e.classList.add("hidden"),e.classList.remove("col-md-3")})),[].slice.call(a.querySelectorAll(".currcomp")).forEach((function(e){e.classList.add("hidden"),e.classList.remove("col-md-3")})),[].slice.call(a.querySelectorAll(".instver")).forEach((function(e){e.classList.add("hidden"),e.classList.remove("col-md-1")})),l.showyellowwarning&&a.querySelector("#updateyellowwarning")&&a.querySelector("#updateyellowwarning").classList.add("hidden"),l.showorangewarning&&a.querySelector("#updateorangewarning")&&a.querySelector("#updateorangewarning").classList.add("hidden"))}))})),[].slice.call(a).forEach((function(e){l.checkCompatibility(e,l.setResultView)}))}},checkCompatibility:function(t,a){var i={element:t,compatibleVersion:0,serverError:1};e.request({url:l.config.serverUrl+"&joomla-target-version="+encodeURIComponent(l.joomlaTargetVersion)+"&joomla-current-version="+l.joomlaCurrentVersion+"&extension-version="+t.getAttribute("data-extension-current-version")+"&extension-id="+encodeURIComponent(t.getAttribute("data-extension-id")),onSuccess:function(e){var t=JSON.parse(e);i.serverError=0,i.compatibilityData=t.data,a(i)},onError:function(){a(i)}})},setResultView:function(a){var i="";if(a.serverError)i=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR"),a.compatibilityData={resultGroup:4};else switch(a.compatibilityData.upgradeCompatibilityStatus.state){case l.STATE.COMPATIBLE:a.compatibilityData.upgradeWarning?(i='<span class="label label-warning">'+a.compatibilityData.upgradeCompatibilityStatus.compatibleVersion+"</span>",l.showyellowwarning=!0):i=!1===a.compatibilityData.upgradeCompatibilityStatus.compatibleVersion?e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"):a.compatibilityData.upgradeCompatibilityStatus.compatibleVersion;break;case l.STATE.INCOMPATIBLE:case l.STATE.MISSING_COMPATIBILITY_TAG:i=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"),l.showorangewarning=!0;break;default:i=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}if(a.element.innerHTML=e.sanitizeHtml(i),i="",a.serverError)i=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR");else switch(a.compatibilityData.currentCompatibilityStatus.state){case l.STATE.COMPATIBLE:i=!1===a.compatibilityData.currentCompatibilityStatus.compatibleVersion?e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION"):a.compatibilityData.currentCompatibilityStatus.compatibleVersion;break;case l.STATE.INCOMPATIBLE:case l.STATE.MISSING_COMPATIBILITY_TAG:i=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:i=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}var n=a.element.getAttribute("data-extension-id");t.getElementById("available-version-"+n).innerText=i;var o=t.querySelector("#compatibilitytype"+a.compatibilityData.resultGroup+" tbody");o&&o.appendChild(a.element.closest("tr")),t.getElementById("compatibilitytype"+a.compatibilityData.resultGroup).style.display="block",t.getElementById("compatibilitytype0").style.display="block",3===a.compatibilityData.resultGroup&&l.nonCoreCriticalPlugins.forEach((function(e,a){e.package_id.toString()!==n&&e.extension_id.toString()!==n||(t.getElementById("#plg_"+e.extension_id).remove(),l.nonCoreCriticalPlugins.splice(a,1))}));var s=t.getElementById("preupdatecheckheadings");if(s&&0===s.querySelectorAll("table td").length&&(s.style.display="none"),!t.querySelector("#compatibilitytype0 tbody td")){if(t.getElementById("compatibilitytype0").style.display="none",l.nonCoreCriticalPlugins.forEach((function(l){var a=t.querySelector('td[data-extension-id="'+l.extension_id+'"]');if(a||(a=t.querySelector('td[data-extension-id="'+l.package_id+'"]')),a){var i=a.closest("tr");i.classList.add("error");var n=i.querySelector("td:first-child");n.innerHTML=e.sanitizeHtml(n.innerHTML+'\n <span class="label label-warning " >\n <span class="icon-warning"></span>\n '+e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN")+'\n </span>\n\n <span class="label label-important 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 <span class="icon-help"></span>\n '+e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_HELP")+"\n </span>");var o=n.querySelector(".hasPopover");o&&(o.style.cursor="pointer",new bootstrap.Popover(o,{placement:"top",html:!0,trigger:"focus click"}))}})),null===t.getElementById("updateView"))return;0===l.nonCoreCriticalPlugins.length?(t.getElementById("preupdateCheckWarning").style.display="none",t.getElementById("preupdateconfirmation").style.display="none",t.getElementById("preupdatecheckbox").style.display="none",t.getElementById("preupdatecheckheadings").style.display="none",t.getElementById("preupdatecheckbox").checked=!0,t.getElementById("noncoreplugins").checked=!0,[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")}))):(t.getElementById("preupdateCheckWarning").classList.add("hidden"),t.getElementById("preupdateCheckCompleteProblems").classList.remove("hidden"),[].slice.call(t.querySelectorAll("#preupdateconfirmation .preupdateconfirmation_label h3")).forEach((function(t){t.innerText=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN_LIST")})),[].slice.call(t.querySelectorAll("#preupdateconfirmation .preupdateconfirmation_label")).forEach((function(e){e.classList.add("label-important"),e.classList.remove("label-warning")})))}}};t.addEventListener("DOMContentLoaded",l.run,!1)}(Joomla,document)}();
The same content is in 2 releases, Joomla 4.0.0-rc2 to 4.0.0-rc3. See them all, or every version of this file.