[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 !function(){"use strict";if(!window.Joomla)throw new Error("Joomla API was not properly initialised");document.addEventListener("DOMContentLoaded",(function e(){var o=Joomla.getOptions("system.paths"),t=Joomla.getOptions("com_scheduler.test-task.token"),a=(o?o.base+"/index.php":window.location.pathname)+"?option=com_ajax&format=json&plugin=RunSchedulerTest&group=system&id=%d"+(t?"&"+t+"=1":""),n=document.getElementById("scheduler-test-modal"),r='\n <h4 class="scheduler-headline">'+Joomla.Text._("COM_SCHEDULER_TEST_RUN_TASK")+"</h4>\n <div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_STARTED")+'</div>\n <div class="mt-3 text-center"><span class="fa fa-spinner fa-spin fa-lg"></span></div>\n ',d=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1<br>$2")};n.addEventListener("show.bs.modal",(function(e){var o=e.relatedTarget,t=parseInt(o.dataset.id,10),i=o.dataset.title;n.querySelector(".modal-title").innerHTML=Joomla.Text._("COM_SCHEDULER_TEST_RUN_TITLE").replace("%d",t.toString()),n.querySelector(".modal-body > div").innerHTML=r.replace("%s",i),Joomla.request({url:a.replace("%d",t.toString()),onSuccess:function(e,o){[].slice.call(n.querySelectorAll(".modal-body > div > div")).forEach((function(e){e.parentNode.removeChild(e)}));var t=JSON.parse(e);if(t&&t.success&&t.data){if(n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_COMPLETED")+"</div>",t.data.duration>0&&(n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_DURATION").replace("%s",t.data.duration.toFixed(2))+"</div>"),t.data.output){var a=Joomla.sanitizeHtml(t.data.output,null,d);n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_OUTPUT").replace("%s",a)+"</div>"}}else n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_TERMINATED")+"</div>",n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_OUTPUT").replace("%s",Joomla.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",o.status))+"</div>"},onError:function(e){n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_TERMINATED")+"</div>";var o=Joomla.ajaxErrorsMessages(e);n.querySelector(".modal-body > div").innerHTML+="<div>"+Joomla.Text._("COM_SCHEDULER_TEST_RUN_OUTPUT").replace("%s",o.error)+"</div>"}})})),n.addEventListener("hidden.bs.modal",(function(){window.location.href=(o?o.base+"/index.php":window.location.pathname)+"?option=com_scheduler&view=tasks"})),document.removeEventListener("DOMContentLoaded",e)}))}();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |