From 146aa0bda472767dd63d870bf7f4c8a99829d0b9 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 6 Jun 2014 18:34:00 +0200 Subject: zeige keinen Disclaimer beim ersten Start --- js/index.js | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'js/index.js') 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'); -- cgit v1.3.1