diff --git a/client/scripts/custom.js.php b/client/scripts/custom.js.php index 28ccc75..f98f944 100644 --- a/client/scripts/custom.js.php +++ b/client/scripts/custom.js.php @@ -346,6 +346,31 @@ eraseCookie('sticky_dark_mode'); } }) + log('[tpl] Init inputs'); + + $('.input-required input, .input-required select, .input-required textarea').on('focusin keyup',function(){ + var spanValue = $(this).parent().find('span').text(); + if($(this).val() != spanValue && $(this).val() != ""){ + $(this).parent().find('span').addClass('input-style-1-active').removeClass('input-style-1-inactive'); + } + if($(this).val() === ""){ + $(this).parent().find('span').removeClass('input-style-1-inactive input-style-1-active'); + } + }); + $('.input-required input, .input-required select, .input-required textarea').on('focusout',function(){ + var spanValue = $(this).parent().find('span').text(); + if($(this).val() === ""){ + $(this).parent().find('span').removeClass('input-style-1-inactive input-style-1-active'); + } + $(this).parent().find('span').addClass('input-style-1-inactive') + }); + $('.input-required select').on('focusout',function(){ + var getValue = $(this)[0].value; + if(getValue === "default"){ + $(this).parent().find('span').removeClass('input-style-1-inactive input-style-1-active'); + } + }); + log('[tpl] init a2h'); //Adding added-to-homescreen class to be targeted when used as PWA. diff --git a/client/scripts/database.js b/client/scripts/database.js index 53cb9bf..b0b3041 100644 --- a/client/scripts/database.js +++ b/client/scripts/database.js @@ -965,10 +965,10 @@ function initDatabase() { db.transaction('update_times').objectStore('update_times').get('last_sync').onsuccess = function (event) { var lastSync = event.target.result.time; - if (lastSync > 0) { + if (lastSync > 1) { runPageScript(); } else { - addSyncInfoToPreloader(); + if (lastSync < 1) addSyncInfoToPreloader(); db.transaction('update_times', 'readwrite').objectStore('update_times').put({ table: 'loggedin', status: isLoggedIn() }); loaderCount --; } diff --git a/server/templates/pagination.html b/server/templates/pagination.html index 0cb3e66..96fb81b 100644 --- a/server/templates/pagination.html +++ b/server/templates/pagination.html @@ -1,4 +1,4 @@ -