summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-03-15 16:37:14 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:42 +0200
commita8894127ff068f1a7ba56c5abf698b9f5a76260b (patch)
treefe3b8ae73116c387083b06d3800c2dc7c10e8705 /js/index.js
parentb8f0594c05ae20af46b29144b8e7180d3100bdfe (diff)
downloadwvs-vplan-a8894127ff068f1a7ba56c5abf698b9f5a76260b.tar.gz
wvs-vplan-a8894127ff068f1a7ba56c5abf698b9f5a76260b.zip
ersetze den Ladebalken durch jQuery-Mobile-Loader
Diffstat (limited to 'js/index.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();
}
}