diff options
| -rw-r--r-- | index.html | 2 | ||||
| -rw-r--r-- | js/index.js | 34 |
2 files changed, 3 insertions, 33 deletions
@@ -110,7 +110,7 @@ </div> <!-- loginpopup --> <div style="text-align: center" id="noplans" style="display:none"><p>Es sind noch keine Pläne verfügbar.</p></div> - <div style="text-align: center"><a id="lnklogin" href="#loginpopup" data-rel="popup" data-role="button" data-position-to="window" data-inline="true" data-transition="pop" onclick="javascript:track('ui/tab/login/loginpopup');">Bitte logge dich ein!</a></div> + <div style="text-align: center"><a id="lnklogin" href="#loginpopup" data-rel="popup" data-role="button" data-position-to="window" data-inline="true" data-transition="pop" onclick="javascript:track('ui/tab/login/loginpopup');">Einloggen</a></div> </div> </div> <!-- vplantabs --> diff --git a/js/index.js b/js/index.js index 47c60a8..4720ed2 100644 --- a/js/index.js +++ b/js/index.js @@ -527,29 +527,6 @@ function fail(text){ track('error/general_' + text.toString() + '_' + text.code); } -/* entfernt das Logintab */ -function removeLoginTab(){ - $('#vplannavbar').find('*').andSelf().each(function(){ - $(this).removeClass(function(i, cn){ - var matches = cn.match(/ui-[\w\-]+/g) || []; - return (matches.join(' ')); - }); - if($(this).attr('class') === ''){ - $(this).removeAttr('class'); - } - }); - - $('#vplannavbar').navbar('destroy'); - $('#vplannavbar ul li:first').remove(); - $('#vplannavbar').navbar(); - - $('#login').remove(); - $('#vplantabs').tabs('refresh'); - - var vdate = moment($('#vplantabs ul li:first').data('date'), 'YYYY-MM-DD'); - trackPlan(vdate); -} - function replaceUmlauts(umlautstr){ tr = {'ä': 'ae', 'ü': 'ue', 'ö': 'oe', 'ß': 'ss'}; @@ -595,10 +572,6 @@ function addPlanAttr(fileEntry, wasdownloaded){ $('#vplantabs').tabs('refresh'); $('#' + name).data('date', results[1]); - - if($('#login').length && wasdownloaded){ - removeLoginTab(); - } } renderPdf(sPath, name); @@ -617,11 +590,7 @@ function downloadPdf(link){ function(fileEntry){ // Datei ist schon heruntergeladen console.log('Datei schon heruntergeladen'); - - if($('#login').length){ - removeLoginTab(); - $.mobile.loading('hide'); // Loader verstecken - } + $.mobile.loading('hide'); // Loader verstecken }, function(err){ // Datei existiert noch nicht @@ -809,6 +778,7 @@ function getActual(entries){ entries.forEach(function(entry){ console.log(entry.name); var results = decodeURIComponent(entry.name).match(fnameRe); + if(results !== null){ var fdate = moment(results[1], 'YYYY-MM-DD'); |
