diff --git a/client/scripts/custom.js.php b/client/scripts/custom.js.php index 51efae7..308f4a4 100644 --- a/client/scripts/custom.js.php +++ b/client/scripts/custom.js.php @@ -1,9 +1,9 @@ var loaderCount = 2; @@ -29,17 +29,17 @@ $(window).on('load',function(){ $(document).ready(function(){ 'use strict' - + var isAJAX = false; //Enables or disable AJAX page transitions and loading. var isDevelopment = false; // Enables development mode. Clean cache & Stops BG & Highlights from changing defaults. - + function init_template(){ - + //ADD YOUR CUSTOM JAVASCRIPT CODES HERE! //Do not put inside HTML files. //The init_template() function will be triggered when pages open. - - + + //Generating Dynamic Styles to decrease CSS size and execute faster loading times. var colorsArray = [ //colors must be in HEX format. @@ -93,24 +93,24 @@ $(document).ready(function(){ ["skype","#12A5F4"], ["instagram","#e1306c"] ]; - - + + //Back Button Scroll Stop //if ('scrollRestoration' in history) {history.scrollRestoration = 'manual';} - + //Disable Page Jump on Empty Links. $('a').on('click', function(){var attrs = $(this).attr('href'); if(attrs === '#'){return false;}}); - + //Adding Background for Gradient if(!$('.menu-hider').length){$('#page').append('
Um Dir alle nötigen Informationen anzeigen zu können, müssen wir die Datenbank synchronisieren.
Dies kann einen Moment dauern. Bitte habe etwas Geduld. Beim nächsten Öffnen geht es schneller.
' + strings['inetMsgOffline'] + '
'); $('body').append('' + strings['inetMsgOnline'] + '
'); } - + //Offline Function Show function isOffline(){ $('.offline-message').addClass('offline-message-active'); $('.online-message').removeClass('online-message-active'); setTimeout(function(){$('.offline-message').removeClass('offline-message-active');},2000); } - + //Online Function Show function isOnline(){ $('.online-message').addClass('online-message-active'); $('.offline-message').removeClass('offline-message-active'); setTimeout(function(){$('.online-message').removeClass('online-message-active');},2000); - } - + } + $('.simulate-offline').on('click',function(){isOffline();}) $('.simulate-online').on('click',function(){isOnline();}) - + //Disable links to other pages if offline. //Warning! Enabling offline for iOS can cause issues //To allow offline functionality delete the next 7 lines @@ -226,27 +235,27 @@ $(document).ready(function(){ if(detectHREF.match(/.html/)){ isOffline(); return false; - } - } - + } + } + //Check if Online / Offline function updateOnlineStatus(event) { var condition = navigator.onLine ? "online" : "offline"; isOnline(); - console.log( 'Connection: Online'); + log( 'Connection: Online'); $("a").off( "click", returnFalse ); } function updateOfflineStatus(event) { isOffline(); $("a").on( "click", returnFalse ); - console.log( 'Connection: Offline'); + log( 'Connection: Offline'); } window.addEventListener('online', updateOnlineStatus); window.addEventListener('offline', updateOfflineStatus); - - + + if(pwaNoCache == true){ - caches.delete('workbox-runtime').then(function() { + caches.delete('workbox-runtime').then(function() { }); localStorage.clear(); sessionStorage.clear() @@ -256,6 +265,6 @@ $(document).ready(function(){ }); }); } - - -}); \ No newline at end of file + + +}); diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index 6bee92b..c53b6f7 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -13,6 +13,19 @@ const YOUTH_AGE = ''; const YOUTH_GERMAN_NAME = ''; const PUSH_SERVER_KEY = ''; +function log() { + var now = new Date(); + var hour = now.getHours().toString(); + var min = now.getMinutes().toString(); + var sec = now.getSeconds().toString(); + var millis = now.getMilliseconds().toString(); + hour = (hour.length < 2 ? '0' + hour : hour); + min = (min.length < 2 ? '0' + min : min); + sec = (sec.length < 2 ? '0' + sec : sec); + while (millis.length < 3) millis = '0' + millis; + console.log('[' + hour + ':' + min + ':' + sec + '.' + millis + ']', ...arguments); +} + var randomId = function() { return '_' + Math.random().toString(36).substr(2, 9); } var badges = { @@ -140,8 +153,8 @@ var login = function() { toastError('Du bist momentan offline.Aktuelles der letzten zwölf Monate
'; - + $sp['output'] .= $tpl->load('card', [$content]); - + + $sp['output'] .= ''; + + // Pagination + $sp['output'] .= $tpl->load('pagination', ['html-id' => 'pagination']); + // Menu $sp['menus'] .= $tpl->load('menu/modal', ['html-id' => 'menu-news', 'title' => 'Details']); - + + $sp['scripts'] .= $scripts->load('pagination', ['pageChange', 'page', 'pageCount', 'pagination']); $cardTemplate = $tpl->load('card', ['%CONTENT%', 'html-id' => '%ID%', 'css-class' => 'card-news']); $cardTemplate = str_replace("\n", '', $cardTemplate); $cardTemplate = str_replace("\r", '', $cardTemplate); $sp['scripts'] .= ""; $sp['scripts'] .= $scripts->load('news'); - -?> \ No newline at end of file + +?> diff --git a/server/content/planning.php b/server/content/planning.php index 85a23df..0b479cc 100644 --- a/server/content/planning.php +++ b/server/content/planning.php @@ -1,19 +1,48 @@ load('error', ['404', 'Seite existiert noch nicht']); - $content .= '';
- $content .= 'Die gesuchte Seite ist leider noch nicht verfügbar.
';
- $content .= 'Wir arbeiten daran, sie schnellstmöglich zur Verfügung zu stellen.
';
- $content .= 'Wie wäre es mit der Homepage?';
- $content .= '
Hinweis: Diese Seite kannst nur Du sehen.
Wenn Du Deine Saison-Planung teilen möchtest, klicke hier
Um Deine Saison-Planung zu sehen, musst Du angemeldet sein.
Melde Dich hier an oder registriere Dich jetzt kostenlos.
';
- $content .= 'Die gesuchte Seite ist leider noch nicht verfügbar.
';
- $content .= 'Wir arbeiten daran, sie schnellstmöglich zur Verfügung zu stellen.
';
- $content .= 'Wie wäre es mit der Homepage?';
+ $content .= 'Du kannst die Saison-Planung momentan leider noch nicht in der App bearbeiten.
';
+ $content .= 'Bis diese Funktion implementiert wurde, erstelle Deine Saison-Planung bitte auf unserer Website.
';
+ $content .= 'Deine Saison-Planung wird dann automatisch synchronisiert und ist dann auch in dieser App verfügbar.
';
+ $content .= 'Wir arbeiten daran, dass Du Deine Saison-Planung bald auch in der App bearbeiten kannst.
';
$content .= '
';
- $content .= 'Die gesuchte Seite ist leider noch nicht verfügbar.
';
- $content .= 'Wir arbeiten daran, sie schnellstmöglich zur Verfügung zu stellen.
';
- $content .= 'Wie wäre es mit der Homepage?';
- $content .= '
Um die Saison-Planungen anderer zu sehen, musst Du angemeldet sein.
Melde Dich hier an oder registriere Dich jetzt kostenlos.
';
- $content .= 'Die gesuchte Seite ist leider noch nicht verfügbar.
';
- $content .= 'Wir arbeiten daran, sie schnellstmöglich zur Verfügung zu stellen.
';
- $content .= 'Wie wäre es mit der Homepage?';
- $content .= '
' + formatDate('d.m.Y', newsEntry.date) + '
'; content += '' + newsEntry.description.replace('\n', '
') + '