diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index 9b5fd0e..0fdd28c 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -122,8 +122,8 @@ var login = function() { showLoader(); var username = $('#input-login-username').val(); var password = $('#input-login-password').val(); - $('#input-login-username').val(''); - $('#input-login-password').val(''); + $('#input-login-username').val('').trigger('focusin').trigger('focusout'); + $('#input-login-password').val('').trigger('focusin').trigger('focusout'); $.ajax({ url: QUERY_URL + 'login', method: 'POST', @@ -135,7 +135,7 @@ var login = function() { error: function (xhr, status, error) { if (xhr.status == 401) { toastError('Benutzername oder Passwort falsch'); - $('#input-login-username').val(username); + $('#input-login-username').val(username).trigger('focusin').trigger('focusout'); } else if (xhr.status == 0) { toastError('Du bist momentan offline.
Stelle eine Internetverbindung her, um Dich anzumelden'); $('#menu-login').hideMenu(); diff --git a/server/scripts/calc.js b/server/scripts/calc.js index 1912e6c..9863499 100644 --- a/server/scripts/calc.js +++ b/server/scripts/calc.js @@ -42,7 +42,7 @@ function addRace() { var m = parseFloat($('#input-m').val()); var fb = parseFloat($('#input-fb').val()); var pl = parseFloat($('#input-pl').val().replace(',', '.')); - + if (isNaN(rlf) || (rlf < 1) || (rlf > 1.6)) { toastError('RLF ungültig'); return; @@ -59,7 +59,7 @@ function addRace() { toastError('pl ungültig'); return; } - + var race = { rlf: rlf, m: m, @@ -67,12 +67,12 @@ function addRace() { pl: pl, rlp: (100 * rlf * ((fb + 1 - pl) / fb)) }; - - $('#input-rlf').val(''); - $('#input-m').val(''); - $('#input-fb').val(''); - $('#input-pl').val(''); - + + $('#input-rlf').val('').trigger('focusin').trigger('focusout'); + $('#input-m').val('').trigger('focusin').trigger('focusout'); + $('#input-fb').val('').trigger('focusin').trigger('focusout'); + $('#input-pl').val('').trigger('focusin').trigger('focusout'); + races.push(race); reCalc(); } @@ -89,4 +89,4 @@ var siteScript = async function () { } reCalc(); hideLoader(); -} \ No newline at end of file +} diff --git a/server/scripts/contact.js b/server/scripts/contact.js index 9a0fdcd..0ae07df 100644 --- a/server/scripts/contact.js +++ b/server/scripts/contact.js @@ -3,12 +3,12 @@ function sendMessage() { var email = $('#input-email').val(); var subject = $('#input-subject').val(); var message = $('#input-message').val(); - + if ((name == '') || (email == '') || (subject == '') || (message == '')) { toastError('Bitte fülle alle Felder aus!'); return; } - + showLoader(); $.ajax({ url: QUERY_URL + 'contact', @@ -31,8 +31,8 @@ function sendMessage() { }, success: function (data, status, xhr) { toastOk('Nachricht erfolgreich versandt!'); - $('#input-subject').val(''); - $('#input-message').val(''); + $('#input-subject').val('').trigger('focusin').trigger('focusout'); + $('#input-message').val('').trigger('focusin').trigger('focusout'); hideLoader(); } }); @@ -46,4 +46,4 @@ var siteScript = async function () { } $('#button-send').click(sendMessage); hideLoader(); -} \ No newline at end of file +}