This commit is contained in:
2025-12-16 11:37:48 +01:00
parent 27aaff83f1
commit a344ce8e4a

View File

@@ -109,6 +109,18 @@
$.get(url, { isOpen: isShown, identifier: id });
}
@if(Html.IsInDebugMode())
{
<text>
$(window).on("focusout", () => {
});
$(window).on("focusin", () => {
});
</text>
}
window.addEventListener("error", (event) => {
hideSpinner();
@@ -182,27 +194,27 @@
}
}
const countdown = new Countdown(parseInt("@AbstractBaseController.TimeoutLimit", 10) * 60,
(remainingSeconds) => {
const remainingMilliseconds = remainingSeconds * 1000;
const countdown = new Countdown(parseInt("@AbstractBaseController.TimeoutLimit", 10) * 60,
(remainingSeconds) => {
const remainingMilliseconds = remainingSeconds * 1000;
const minutes = Math.floor((remainingMilliseconds % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((remainingMilliseconds % (1000 * 60)) / 1000);
const minutes = Math.floor((remainingMilliseconds % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((remainingMilliseconds % (1000 * 60)) / 1000);
var m = minutes.toString().padStart(2, "0");
var s = seconds.toString().padStart(2, "0");
var m = minutes.toString().padStart(2, "0");
var s = seconds.toString().padStart(2, "0");
const timePart = minutes <= 5 ? ` class="text-danger"` : "";
$("#countdown").html(`<span${timePart}>Abmeldung in ${m}:${s}<span class="fas fa-unlock-alt pl-1"></span></span>`);
},
() => {
$("#countdown").html("00:00");
$("#logout-form").submit();
}
);
const timePart = minutes <= 5 ? ` class="text-danger"` : "";
$("#countdown").html(`<span${timePart}>Abmeldung in ${m}:${s}<span class="fas fa-unlock-alt pl-1"></span></span>`);
},
() => {
$("#countdown").html("00:00");
$("#logout-form").submit();
}
);
$(document).ready(function() {
countdown?.start();
$(document).ready(function() {
countdown?.start();
$.each($("canvas"), function(index, canvasElement) {
updateCanvasSize($(canvasElement));
@@ -235,15 +247,15 @@
}
});
function toggleRestoreButton() {
const state = false;
function toggleRestoreButton() {
const state = false;
if($(".bewo-restore-btn").length > 0) {
$(".bewo-restore-btn").each(function(index, item) {
$(this).prop("disabled", state);
});
}
}
if($(".bewo-restore-btn").length > 0) {
$(".bewo-restore-btn").each(function(index, item) {
$(this).prop("disabled", state);
});
}
}
$(window).resize(function () {
$.each($("canvas"), function(index, canvasElement) {
@@ -337,7 +349,7 @@
function getMaxElementHeight(elementClassName) {
return Math.max.apply(Math, $(`.${elementClassName}`).map(function () { return $(this).height(); }).get());
}
}
</script>