From 07f3cbe9c41f9d57c5d89bbc1504b8eb41fc0741 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 30 May 2014 08:48:44 +0100 Subject: zeige Logintab ständig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- js/index.js | 34 ++-------------------------------- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/index.html b/index.html index 25650e8..1e04776 100644 --- a/index.html +++ b/index.html @@ -110,7 +110,7 @@

Es sind noch keine Pläne verfügbar.

-
Bitte logge dich ein!
+
Einloggen
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'); -- cgit v1.3.1