Compare commits
2 Commits
e874a94fec
...
c7aaf102f4
Author | SHA1 | Date | |
---|---|---|---|
c7aaf102f4 | |||
c354f093c1 |
@ -64,16 +64,24 @@ function initRunButtons() {
|
||||
var bsModal = new Modal('#run_selecttime');
|
||||
bsModal.show();
|
||||
|
||||
document.querySelectorAll('.schedule').forEach(elem => elem.addEventListener("click", event => {
|
||||
let schedulefn = event => {
|
||||
bsModal.hide();
|
||||
let time = Math.floor(selecttimedatepicker.viewDate / 1000);
|
||||
run(me, time);
|
||||
}, { once: true } ));
|
||||
document.querySelectorAll('.run-now').forEach(elem => elem.addEventListener("click", event => {
|
||||
}
|
||||
let runnowfn = event => {
|
||||
bsModal.hide();
|
||||
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) {
|
||||
let href = elem.dataset.href;
|
||||
|
679
composer.lock
generated
679
composer.lock
generated
File diff suppressed because it is too large
Load Diff
915
package-lock.json
generated
915
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user