summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-03-29 13:03:46 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:48 +0200
commitf182c85ca8433f8e02acdfe9ac1c2914153903a1 (patch)
tree9d64023fe5b7de1779e606201fa4573c8cefcc02 /js/index.js
parent16ad14592f10b2fbb0ebd7c62d87e6dfc98d1045 (diff)
downloadwvs-vplan-f182c85ca8433f8e02acdfe9ac1c2914153903a1.tar.gz
wvs-vplan-f182c85ca8433f8e02acdfe9ac1c2914153903a1.zip
ändere Ladebalken
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/js/index.js b/js/index.js
index f1f3f18..bc3eaff 100644
--- a/js/index.js
+++ b/js/index.js
@@ -23,13 +23,6 @@ $('#loginpage').on('pagebeforeshow', function loginform(){
}, 500);
});
-// einen Slider zu einem Ladebalken umstylen
-$(document).on('pageinit', function(){
- $('#loader').parent().find('input').hide();
- $('#loader').parent().find('.ui-slider-track').css('margin', '0 15px 0 15px');
- $('#loader').parent().find('.ui-slider-handle').hide();
-});
-
// Page-Template für Vertretungsplan
var page_html = '\n\
<div data-role="page" class="page" id="page-vplan-{ID}" data-prefetch>\n\
@@ -86,8 +79,9 @@ function render_pdf(viewerstr){
}
function fail(text){
- $('#error_noconn').show('fast');
+ $('#loginform').removeClass('ui-disabled');
$('#loader').hide('slow');
+ $('#error_noconn').show('fast');
console.log('Fehler: ' + text.toString());
}
@@ -113,7 +107,6 @@ function download_pdf(link, id){
$('#pdf-' + id).attr('data-plan-url', theFile.toURL());
if(location.href.indexOf('page-') == -1){
- $('#loader').hide('fast');
$.mobile.changePage('#page-vplan-' + id);
}
},
@@ -209,13 +202,14 @@ function login(){
var password = encodeURIComponent($('#password').val());
var params = 'username=' + username + '&password=' + password;
+ $('#loginform').addClass('ui-disabled');
+ $('#loader').show('fast');
+
var request = $.ajax({
type: 'POST',
url: 'https://***REMOVED***/moodle/login/index.php',
data: {username: username, password: password}
});
-
- $('#loader').show('fast');
request.done(function(result){
var vertretungs_re = new RegExp('title="Vertretungsplan" href="(http://***REMOVED***\\.de/moodle/course/view\\.php\\?id=\\d+)"');