diff options
| -rw-r--r-- | css/index.css | 3 | ||||
| -rw-r--r-- | index.html | 8 | ||||
| -rw-r--r-- | js/index.js | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/css/index.css b/css/index.css index 627220e..0f732cf 100644 --- a/css/index.css +++ b/css/index.css @@ -46,3 +46,6 @@ body { right: 0; } } + +.viewLayout { +} @@ -29,13 +29,13 @@ <body> <div class="app"> <x-flipbox id="viewFlipBox"> - <div> + <div> <x-appbar> <h1>WvS VPlan | Login</h1> <button>=</button> </x-appbar> - <x-layout> - <form action="javascript:document.getElementById('viewFlipBox').toggle();" onsubmit="login()"> + <x-layout class="viewLayout"> + <form action="javascript:login()"> <section> <input type="text" id="username" hint="Benutzername" autofocus required> <input type="password" id="password" hint="Passwort" required> @@ -50,7 +50,7 @@ <h1>WvS VPlan | Vertretungsplan</h1> <button>=</button> </x-appbar> - <x-layout> + <x-layout class="viewLayout"> Hier steht der V-Plan. </x-layout> </div> diff --git a/js/index.js b/js/index.js index ab4d48e..7d66553 100644 --- a/js/index.js +++ b/js/index.js @@ -31,6 +31,7 @@ function login(){ console.log("Etwas ist schiefgelaufen :("); }else{ console.log('Request erfolgreich'); + document.getElementById('viewFlipBox').toggle(); } } } @@ -38,7 +39,7 @@ function login(){ req.open("POST", "https://***REMOVED***/moodle/login/index.php", true); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req.send(params); -} +}; var app = { // Application Constructor |
