mirror of
http://git.frickel.earth/Tysox/BOS-Pinneberg.git
synced 2025-12-14 22:26:45 +01:00
53 lines
1.8 KiB
JavaScript
53 lines
1.8 KiB
JavaScript
$(".input").focusin(function () {
|
|
$(this).find("span").animate({"opacity": "0"}, 100);
|
|
});
|
|
|
|
$(".input").focusout(function () {
|
|
$(this).find("span").animate({"opacity": "1"}, 200);
|
|
});
|
|
|
|
$(".login").submit(function () {
|
|
$(".feedback").show().animate({"opacity": "1", "bottom": "-80px"}, 400);
|
|
$(".feedback").show().animate({"opacity": "0"}, 3000);
|
|
return false;
|
|
});
|
|
|
|
function loginSuccess() {
|
|
document.getElementById("submit").disabled = true;
|
|
|
|
$("input").css({"border-color": "ghostwhite"});
|
|
$("#submit").find("i").removeAttr("class").addClass("fa fa-check");
|
|
$("#submit").css({"border-color": "limegreen", "color": "limegreen"});
|
|
$("#submit").removeClass('submit-active');
|
|
$("input").blur();
|
|
}
|
|
|
|
function loginFailed() {
|
|
document.getElementById("username").disabled = false;
|
|
document.getElementById("password").disabled = false;
|
|
document.getElementById("submit").disabled = true;
|
|
|
|
$("input").css({"border-color": "indianred"});
|
|
$("#submit").find("i").removeAttr("class").addClass("fa fa-chevron-right").css({"color": "lightgray"});
|
|
$("#submit").css({"border-color": "lightgray"});
|
|
$("#submit").removeClass('submit-active');
|
|
$("input").blur();
|
|
|
|
closeLoadingOverlay();
|
|
|
|
setTimeout(function () {
|
|
document.getElementById("submit").disabled = false;
|
|
$("input").css({"border-color": "ghostwhite"});
|
|
$("#submit").find("i").removeAttr("class").addClass("fa fa-chevron-right").css({"color": ""});
|
|
$("#submit").css({"border-color": "cornflowerblue"});
|
|
$("#submit").addClass('submit-active');
|
|
}, 3500);
|
|
}
|
|
|
|
function openLoadingOverlay() {
|
|
document.getElementById("loadingOverlay").style.height = "100%";
|
|
}
|
|
|
|
function closeLoadingOverlay() {
|
|
document.getElementById("loadingOverlay").style.height = "0%";
|
|
} |