Compare commits

...

2 Commits

Author SHA1 Message Date
c7aaf102f4
BUGFIX: don't call functions twice 2023-03-15 12:36:21 +01:00
c354f093c1
BUGFIX: updated dependencies 2023-03-15 12:23:13 +01:00
3 changed files with 830 additions and 782 deletions

View File

@ -64,16 +64,24 @@ function initRunButtons() {
var bsModal = new Modal('#run_selecttime'); var bsModal = new Modal('#run_selecttime');
bsModal.show(); bsModal.show();
document.querySelectorAll('.schedule').forEach(elem => elem.addEventListener("click", event => { let schedulefn = event => {
bsModal.hide(); bsModal.hide();
let time = Math.floor(selecttimedatepicker.viewDate / 1000); let time = Math.floor(selecttimedatepicker.viewDate / 1000);
run(me, time); run(me, time);
}, { once: true } )); }
document.querySelectorAll('.run-now').forEach(elem => elem.addEventListener("click", event => { let runnowfn = event => {
bsModal.hide(); bsModal.hide();
run(me); run(me);
}, { once: true } )); }
})); let closebtnfn = event => {
bsModal.hide();
document.querySelectorAll('.schedule').forEach(elem => elem.removeEventListener("click", schedulefn));
document.querySelectorAll('.run-now').forEach(elem => elem.removeEventListener("click",runnowfn));
}
document.querySelectorAll('.schedule').forEach(elem => elem.addEventListener("click", schedulefn, { once: true } ));
document.querySelectorAll('.run-now').forEach(elem => elem.addEventListener("click", runnowfn, { once: true } ));
document.querySelectorAll('.btn-close').forEach(elem => elem.addEventListener("click", closebtnfn ));
} ));
} }
function run(elem, time = 0) { function run(elem, time = 0) {
let href = elem.dataset.href; let href = elem.dataset.href;

679
composer.lock generated

File diff suppressed because it is too large Load Diff

915
package-lock.json generated

File diff suppressed because it is too large Load Diff