gitflow-hotfix-stash: fix_inputs_forcesync
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 --;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user