diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-31 19:45:11 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-15 20:02:35 +0200 |
| commit | 581c65fb46fe66d74db48dafc815729c0f62a0af (patch) | |
| tree | 58dac3fe7ad93adecd26622ce7ea82081d344acf /js | |
| parent | 2e82123711e853544cd0581fd35693b6df03d805 (diff) | |
| download | wvs-vplan-581c65fb46fe66d74db48dafc815729c0f62a0af.tar.gz wvs-vplan-581c65fb46fe66d74db48dafc815729c0f62a0af.zip | |
zeige richtige Fehlermeldung bei fehlender Verbindung
Diffstat (limited to 'js')
| -rw-r--r-- | js/index.js | 10 |
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(); } |
