From 9f776a769c9a23a7a316ad45419afac4c2c23dee Mon Sep 17 00:00:00 2001 From: Benjamin Trenkle Date: Thu, 25 Nov 2021 02:22:48 +0100 Subject: [PATCH 1/2] Add page reload after testing --- .../com_scheduler/js/admin-view-run-test-task.es6.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js b/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js index 7f889452fdf..3235eea86c5 100644 --- a/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js +++ b/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js @@ -80,7 +80,13 @@ const initRunner = () => { }); }; + const reloadOnClose = (e) => { + const paths = Joomla.getOptions('system.paths'); + window.location.href = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_scheduler&view=tasks`; + }; + modal.addEventListener('show.bs.modal', triggerTaskAndShowOutput); + modal.addEventListener('hidden.bs.modal', reloadOnClose); document.removeEventListener('DOMContentLoaded', initRunner); }; From 6526ce9a490d511f42c0911e51251f534bc09f20 Mon Sep 17 00:00:00 2001 From: Benjamin Trenkle Date: Thu, 25 Nov 2021 09:10:06 +0100 Subject: [PATCH 2/2] Code sniffer fixes --- .../com_scheduler/js/admin-view-run-test-task.es6.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js b/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js index 3235eea86c5..49b1b2af420 100644 --- a/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js +++ b/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js @@ -80,8 +80,7 @@ const initRunner = () => { }); }; - const reloadOnClose = (e) => { - const paths = Joomla.getOptions('system.paths'); + const reloadOnClose = () => { window.location.href = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_scheduler&view=tasks`; };