2023-06-27 17:37:41 +02:00
|
|
|
/* global $, interval */
|
|
|
|
$(document).ready(() => {
|
2023-09-27 10:50:33 +02:00
|
|
|
// Set close on select.
|
|
|
|
$("#_credentials_").select2({
|
|
|
|
closeOnSelect: true
|
|
|
|
});
|
|
|
|
|
2023-06-27 17:37:41 +02:00
|
|
|
if (interval === "0") {
|
|
|
|
setTimeout(() => {
|
|
|
|
$("#mode_interval")
|
|
|
|
.parent()
|
|
|
|
.find("[id^='interval']")
|
|
|
|
.hide();
|
|
|
|
}, 100);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
function changeModeInterval(e) {
|
|
|
|
if ($(e).val() === "manual") {
|
|
|
|
$(e)
|
|
|
|
.parent()
|
|
|
|
.find("[id^='interval']")
|
|
|
|
.hide();
|
|
|
|
} else {
|
|
|
|
var interval = $(e)
|
|
|
|
.parent()
|
|
|
|
.find("div[id^='interval']")[0];
|
|
|
|
$(interval).show();
|
|
|
|
}
|
|
|
|
}
|