summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-05-31 19:45:11 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 20:02:35 +0200
commit581c65fb46fe66d74db48dafc815729c0f62a0af (patch)
tree58dac3fe7ad93adecd26622ce7ea82081d344acf
parent2e82123711e853544cd0581fd35693b6df03d805 (diff)
downloadwvs-vplan-581c65fb46fe66d74db48dafc815729c0f62a0af.tar.gz
wvs-vplan-581c65fb46fe66d74db48dafc815729c0f62a0af.zip
zeige richtige Fehlermeldung bei fehlender Verbindung
-rw-r--r--js/index.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/index.js b/js/index.js
index f426212..8416bbf 100644
--- a/js/index.js
+++ b/js/index.js
@@ -104,12 +104,12 @@ $('#settingspanel').on('panelclose', function(){
localStorage.setItem('apptheme', $('#themeselect').val());
});
-document.addEventListener('offline', function offline(){
+document.addEventListener('offline', function(){
$('#loginsubmit').prop('disabled', true);
$('#error_noconn').show('fast');
}, false);
-document.addEventListener('online', function online(){
+document.addEventListener('online', function(){
$('#loginsubmit').prop('disabled', false);
$('#error_noconn').hide('fast');
}, false);
@@ -207,7 +207,11 @@ document.addEventListener('deviceready', function(){
$('#dntflip').val(dntrack);
}else{
fillForm();
- updateCheck();
+
+ if(navigator.connection.type !== Connection.NONE){ // falls Netz da ist
+ updateCheck();
+ }
+
window.plugin.notification.local.cancelAll(); // alle Benachrichtigungen canceln, werden während des Renderings neu gesetzt
load();
}