summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/index.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/js/index.js b/js/index.js
index 3c4c4d8..66b6d4e 100644
--- a/js/index.js
+++ b/js/index.js
@@ -21,11 +21,8 @@ function get_overview(){
req.onreadystatechange = function(){
if(req.readyState == 4){
- if(req.status == 200 || window.location.href.indexOh("http") != -1){
+ if(req.status == 200 || window.location.href.indexOf("http") != -1){
console.log('Übersichts-Request erfolgreich');
- $(".progress").css("max-width","40%");
- $(".progress-view").text("40%");
- document.getElementById('viewFlipBox').toggle();
return 1;
}else{
console.log('Etwas ist schiefgelaufen :(');
@@ -39,10 +36,16 @@ function get_overview(){
}
function login(){
+ $.mobile.loading("show", {
+ text: "Lade... 0%",
+ textVisible: true,
+ theme: "b",
+ });
+
var req = new XMLHttpRequest();
- var username = encodeURIComponent(document.getElementById('username').value);
- var password = encodeURIComponent(document.getElementById('password').value);
+ var username = encodeURIComponent($("#username").value);
+ var password = encodeURIComponent($("#password").value);
var params = "username=" + username + "&password=" + password;
req.onreadystatechange = function(){
@@ -55,8 +58,6 @@ function login(){
return;
}else{
console.log('Login-Request erfolgreich');
- document.getElementById("load-progress").style.maxWidth = "20%"; // TODO geht nicht
- document.getElementById("load-progress-view").text = "20%";
get_overview();
}
}