1441 |
ariadna |
1 |
define("core/task_indicator",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default=
|
|
|
2 |
/**
|
|
|
3 |
* Task indicator
|
|
|
4 |
*
|
|
|
5 |
* Watches the progress bar inside the task indicator for updates, and redirects when the progress is complete.
|
|
|
6 |
*
|
|
|
7 |
* @module core/task_indicator
|
|
|
8 |
* @copyright 2024 Catalyst IT Europe Ltd
|
|
|
9 |
* @author Mark Johnson <mark.johnson@catalyst-eu.net>
|
|
|
10 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
11 |
*/
|
|
|
12 |
class{static init(id,redirectUrl){const bar=document.getElementById(id);bar.addEventListener("update",(event=>{var _event$detail;const percent=null==event||null===(_event$detail=event.detail)||void 0===_event$detail?void 0:_event$detail.percent;if(percent>0){bar.classList.remove("stored-progress-notstarted");const runlink=document.querySelector(".runlink[data-idnumber=".concat(id,"]"));runlink&&runlink.remove()}""!==redirectUrl&&100===percent&&window.setTimeout((()=>window.location.assign(redirectUrl)),2e3)}))}},_exports.default}));
|
|
|
13 |
|
|
|
14 |
//# sourceMappingURL=task_indicator.min.js.map
|