RA-#3 Trigger inputs after programmatically changed
This commit is contained in:
@@ -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.<br>Stelle eine Internetverbindung her, um Dich anzumelden');
|
||||
$('#menu-login').hideMenu();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user