diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php
index 21a5d22..e09be45 100644
--- a/client/scripts/regatten.js.php
+++ b/client/scripts/regatten.js.php
@@ -131,6 +131,47 @@ function findGetParameter(parameterName) {
return result;
}
+var signup = function() {
+ var username = $('#input-signup-username').val();
+ var email = $('#input-signup-email').val();
+ var password = $('#input-signup-password').val();
+ if (username == '') { $('#input-signup-username').focus(); return; }
+ if (email == '') { $('#input-signup-email').focus(); return; }
+ if (password == '') { $('#input-signup-password').focus(); return; }
+ showLoader();
+ $('#input-signup-username').val('').trigger('focusin').trigger('focusout');
+ $('#input-signup-email').val('').trigger('focusin').trigger('focusout');
+ $('#input-signup-password').val('').trigger('focusin').trigger('focusout');
+ $.ajax({
+ url: QUERY_URL + 'signup',
+ method: 'POST',
+ data: {
+ username: username,
+ email: email,
+ password: password
+ },
+ error: function (xhr, status, error) {
+ if (xhr.status == 409) {
+ toastError('Benutzername bereits vergeben');
+ $('#input-signup-email').val(email).trigger('focusin').trigger('focusout');
+ } else if (xhr.status == 0) {
+ toastError('Du bist momentan offline.
Stelle eine Internetverbindung her, um Dich anzumelden');
+ $('#menu-signup').hideMenu();
+ } else {
+ log('[app] Signup: unbekannter Fehler', status, error);
+ log(xhr);
+ toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
+ }
+ hideLoader();
+ },
+ success: function (data, status, xhr) {
+ $('#input-login-username').val(username);
+ $('#input-login-password').val(password);
+ login();
+ }
+ });
+}
+
var login = function() {
showLoader();
var username = $('#input-login-username').val();
diff --git a/server/content/index.php b/server/content/index.php
index 0f054f5..acd380f 100644
--- a/server/content/index.php
+++ b/server/content/index.php
@@ -92,7 +92,7 @@
// Favorites Menu
$items = $tpl->load('menu/item-icon', ['Nicht mehr folgen', '#', 'html-id' => 'menu-item-unfollow', 'icon' => 'fa-heart', 'css-class' => ' border-0']);
- $sp['menus'] .= $tpl->load('menu/bottom', [$items, 'html-id' => 'menu-favorite', 'title' => 'Favorit', 'height' => 150]);
+ $sp['menus'] .= $tpl->load('menu/bottom', [$items, 'html-id' => 'menu-favorite', 'title' => 'Favorit', 'height' => 200]);
$sp['scripts'] .= $scripts->load('onRegattaClicked');
$sp['scripts'] .= $scripts->load('index');
diff --git a/server/page/menus.php b/server/page/menus.php
index 30917c2..0b1374e 100644
--- a/server/page/menus.php
+++ b/server/page/menus.php
@@ -245,7 +245,7 @@
-