summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-06-06 18:34:00 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 20:02:38 +0200
commit146aa0bda472767dd63d870bf7f4c8a99829d0b9 (patch)
treec58ae0f349964228e11124a97670ad006bde6f60 /js
parent367e7b643e97ec3d22befbe925772636bd75d7e8 (diff)
downloadwvs-vplan-146aa0bda472767dd63d870bf7f4c8a99829d0b9.tar.gz
wvs-vplan-146aa0bda472767dd63d870bf7f4c8a99829d0b9.zip
zeige keinen Disclaimer beim ersten Start
Diffstat (limited to 'js')
-rw-r--r--js/index.js29
1 files changed, 9 insertions, 20 deletions
diff --git a/js/index.js b/js/index.js
index 09049f5..d2a2e01 100644
--- a/js/index.js
+++ b/js/index.js
@@ -198,23 +198,19 @@ document.addEventListener('deviceready', function(){
var dntrack = localStorage.getItem('dntrack');
if(dntrack === null || dntrack.length === 0){
- setTimeout(function(){
- $('#lnkdisclaimer').click();
- }, 2000);
-
- _paq.push(['setDoNotTrack', false]);
localStorage.setItem('dntrack', false);
- $('#dntflip').val(dntrack);
- }else{
- fillForm();
+ _paq.push(['setDoNotTrack', false]);
+ $('#dntflip').val(dntrack).slider('refresh');
+ }
- if(navigator.connection.type !== Connection.NONE){ // falls Netz da ist
- updateCheck(); // checkt ob aktuellste Version und loggt ein
- }
+ fillForm();
- window.plugin.notification.local.cancelAll(); // alle Benachrichtigungen canceln, werden während des Renderings neu gesetzt
- load();
+ if(navigator.connection.type !== Connection.NONE){ // falls Netz da ist
+ updateCheck(); // checkt ob aktuellste Version und loggt ein
}
+
+ window.plugin.notification.local.cancelAll(); // alle Benachrichtigungen canceln, werden während des Renderings neu gesetzt
+ load();
}, false);
/* der Loader wird nur angezeigt, wenn das Popup zu ist */
@@ -222,13 +218,6 @@ $('#loginpopup').on('popupafteropen', function(){
$.mobile.loading('hide');
});
-$('#disclaimerpopup').on('popupafterclose', function(){
- fillForm();
- updateCheck();
- window.plugin.notification.local.cancelAll();
- load();
-});
-
/* füllt die Loginform mit gespeicherten Werten */
function fillForm(){
var username = localStorage.getItem('username');