芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.7/com_joomlaupdate/js/default-es5.min.js
!function(){"use strict";Joomla=window.Joomla||{},function(e,t){e.submitbuttonUpload=function(){var 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=function(){var a=t.getElementById("uploadForm"),i=a.install_package.files[0].size,n=1*i/1024/1024,l=t.getElementById("file_size"),o=t.getElementById("max_upload_size_warn");""===a.install_package.value?(l.classList.add("hidden"),o.classList.add("hidden")):i&&(l.classList.remove("hidden"),l.innerHTML=e.sanitizeHtml(e.Text._("JGLOBAL_SELECTED_UPLOAD_FILE_SIZE").replace("%s",n.toFixed(2)+" MB")),i>a.max_upload_size.value?o.classList.remove("hidden"):o.classList.add("hidden"))},t.addEventListener("DOMContentLoaded",(function(){var a=t.getElementById("uploadButton"),i=t.getElementById("install_package"),n=t.querySelector(".emptystate-btnadd",t.getElementById("joomlaupdate-wrapper")),l=t.getElementById("joomlaupdate-confirm-backup"),o=n?n.closest("form"):null,r=o?o.querySelector("[name=task]",o):null;a&&a.addEventListener("click",e.submitbuttonUpload),i&&i.addEventListener("change",e.installpackageChange),n&&"#"===n.getAttribute("href")&&r&&n.addEventListener("click",(function(e){e.preventDefault(),l&&!l.checked||(r.value="update.download",o.submit())}))}))}(Joomla,document),function(e,t){var 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:function(e){var a=t.querySelector("#joomlaupdate-precheck-extensions-tab .fa-spinner"),i="success",n="check";switch(e){case"danger":i="danger",n="times";break;case"warning":i="warning",n="exclamation-triangle"}a&&(a.classList.remove("fa-spinner","fa-spin","text-info"),a.classList.add("fa-"+n,"text-"+i));var l=t.querySelector("#compatibilityTable0"),o=t.querySelector("#preupdateCheckWarning");l&&l.classList.add("hidden"),o&&o.classList.add("hidden")},run:function(){a.nonCoreCriticalPlugins=e.getOptions("nonCoreCriticalPlugins",[]);var 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((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")})),void a.cleanup();null!==t.getElementById("noncoreplugins")&&t.getElementById("noncoreplugins").addEventListener("change",(function(){var 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((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")})):a.checked=!1:[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((function(e){e.classList.add("disabled"),e.setAttribute("disabled","")}))}));var 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((function(t){t.addEventListener("click",(function(){var 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((function(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((function(e){e.classList.add("hidden")})))}))})),[].slice.call(i).forEach((function(e){a.checkCompatibility(e,a.setResultView)}))},checkCompatibility:function(t,i){var n={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:function(e){var t=JSON.parse(e);n.serverError=0,n.compatibilityData=t.data,i(n)},onError:function(){n.serverError=1,i(n)}})},setResultView:function(i){var n="";if(i.serverError)n=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)n='
'+e.sanitizeHtml(i.compatibilityData.upgradeCompatibilityStatus.compatibleVersion)+"
";else n=!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:n=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:n=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}if(i.element.innerHTML=n,n="",i.serverError)n=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_SERVER_ERROR");else switch(i.compatibilityData.currentCompatibilityStatus.state){case a.STATE.COMPATIBLE:n=!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:n=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NO_COMPATIBILITY_INFORMATION");break;default:n=e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN")}var l=i.element.getAttribute("data-extension-id");t.getElementById("available-version-"+l).innerText=n;var o=t.querySelector("#compatibilityTable"+i.compatibilityData.resultGroup+" tbody");if(o&&o.appendChild(i.element.closest("tr")),t.getElementById("compatibilityTable"+i.compatibilityData.resultGroup).classList.remove("hidden"),3===i.compatibilityData.resultGroup&&(a.nonCoreCriticalPlugins=a.nonCoreCriticalPlugins.filter((function(e){return!(e.package_id.toString()===l||e.extension_id.toString()===l)}))),!t.querySelector("#compatibilityTable0 tbody td")){t.getElementById("compatibilityTable0").classList.add("hidden");var r="success";a.nonCoreCriticalPlugins.forEach((function(a){var i=t.querySelector('td[data-extension-id="'+a.extension_id+'"]');if(i||(i=t.querySelector('td[data-extension-id="'+a.package_id+'"]')),i){var n=i.closest("tr");n.classList.add("error");var l=n.querySelector(".exname");l.innerHTML=e.sanitizeHtml(l.innerHTML)+'\n
\n
\n
\n '+e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN")+'\n
\n\n
\n '+e.Text._("COM_JOOMLAUPDATE_VIEW_DEFAULT_HELP")+"\n
\n
";var o=l.querySelector(".hasPopover");o&&(o.style.cursor="pointer",new bootstrap.Popover(o,{placement:"top",html:!0,trigger:"focus"})),r="danger"}})),t.querySelector("#compatibilityTable2 tbody td")?r="danger":"danger"!==r&&t.querySelector("#compatibilityTable1 tbody td")&&(r="warning"),0===a.nonCoreCriticalPlugins.length&&"success"===r?(t.getElementById("preupdatecheckbox").style.display="none",t.getElementById("noncoreplugins").checked=!0,[].slice.call(t.querySelectorAll("button.submitupdate")).forEach((function(e){e.classList.remove("disabled"),e.removeAttribute("disabled")}))):a.nonCoreCriticalPlugins.length>0&&t.getElementById("preupdateCheckCompleteProblems").classList.remove("hidden"),a.cleanup(r)}}};null!==t.getElementById("preupdatecheck")&&t.addEventListener("DOMContentLoaded",a.run,!1)}(Joomla,document)}();