Compare commits
9 Commits
v_1.10.4
...
fix_inputs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
326ba4a6bd | ||
|
|
a38c48dab4 | ||
|
|
da48e79a36 | ||
|
|
de5abcdfaf | ||
|
|
89e24f69b7 | ||
|
|
554b810e85 | ||
|
|
fbd1eaaae8 | ||
|
|
ce42f87227 | ||
|
|
fcd791ed65 |
@@ -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,11 +965,12 @@ 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 --;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -273,12 +273,6 @@ var siteScript = async function() {
|
||||
var maxDate = getToday();
|
||||
maxDate.setDate(maxDate.getDate() - 1);
|
||||
var regattas = await dbGetRegattasRange(minDate, maxDate);
|
||||
var regattaResults = [];
|
||||
for (id in regattas) {
|
||||
var entry = regattas[id];
|
||||
var results = await dbGetDataIndex('results', 'regatta', entry['id']);
|
||||
regattaResults[entry['id']] = (results.length > 0);
|
||||
}
|
||||
regattas.sort(function(a,b){
|
||||
return b.date.localeCompare(a.date);
|
||||
});
|
||||
@@ -323,7 +317,7 @@ var siteScript = async function() {
|
||||
icons.push('<i class="fas fa-book"></i>');
|
||||
if (regatta['canceled'] == '1') {
|
||||
icons.push('<i class="fas fa-times color-red2-dark"></i>');
|
||||
} else if (regattaResults[regatta['id']]) {
|
||||
} else if (regatta['results'] == '1') {
|
||||
icons.push('<i class="fas fa-poll"></i>');
|
||||
}
|
||||
list += '<div class="color-green2-dark">' + icons.join(' ') + '</div>';
|
||||
|
||||
@@ -61,8 +61,7 @@ async function onRegattaClicked(id) {
|
||||
}
|
||||
|
||||
// Results
|
||||
var results = await dbGetDataIndex('results', 'regatta', regatta['id']);
|
||||
if (results.length > 0) {
|
||||
if (regatta['results'] == '1') {
|
||||
$('#menu-item-results').show();
|
||||
$('#menu-item-results').attr('href', LINK_PRE + 'result?regatta=' + regatta['id']);
|
||||
} else {
|
||||
|
||||
@@ -137,12 +137,6 @@ var siteScript = async function() {
|
||||
regattas.splice(i, 1);
|
||||
}
|
||||
}
|
||||
var regattaResults = [];
|
||||
for (id in regattas) {
|
||||
var entry = regattas[id];
|
||||
var results = await dbGetDataIndex('results', 'regatta', entry['id']);
|
||||
regattaResults[entry['id']] = (results.length > 0);
|
||||
}
|
||||
|
||||
var years = await dbGetData('years');
|
||||
years.sort(function (a, b) {
|
||||
@@ -262,7 +256,7 @@ var siteScript = async function() {
|
||||
icons.push('<i class="fas fa-book"></i>');
|
||||
if (entry['canceled'] == '1') {
|
||||
icons.push('<i class="fas fa-times color-red2-dark"></i>');
|
||||
} else if (regattaResults[entry['id']]) {
|
||||
} else if (entry['results'] == '1') {
|
||||
icons.push('<i class="fas fa-poll"></i>');
|
||||
}
|
||||
if (entry.planning.gemeldet == '1') {
|
||||
|
||||
@@ -79,12 +79,6 @@ var siteScript = async function() {
|
||||
var minDate = parseDate($('#input-from').val());
|
||||
var maxDate = parseDate($('#input-to').val());
|
||||
var regattas = await dbGetRegattasRange(minDate, maxDate);
|
||||
var regattaResults = [];
|
||||
for (id in regattas) {
|
||||
var entry = regattas[id];
|
||||
var results = await dbGetDataIndex('results', 'regatta', entry['id']);
|
||||
regattaResults[entry['id']] = (results.length > 0);
|
||||
}
|
||||
|
||||
var selectedYear = $('#select-year').val();
|
||||
|
||||
@@ -196,7 +190,7 @@ var siteScript = async function() {
|
||||
icons.push('<i class="fas fa-book"></i>');
|
||||
if (entry['canceled'] == '1') {
|
||||
icons.push('<i class="fas fa-times color-red2-dark"></i>');
|
||||
} else if (regattaResults[entry['id']]) {
|
||||
} else if (entry['results'] == '1') {
|
||||
icons.push('<i class="fas fa-poll"></i>');
|
||||
}
|
||||
row.content += '<div class="color-green2-dark">' + icons.join(' ') + '</div>';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav id="$$html-id;">
|
||||
<nav id="$$html-id;" class="$$css-class;">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li id="$$html-id;-1" class="page-item"><a onclick="onPaginationClick(this)" class="page-link color-black bg-theme rounded-xs shadow-x1 border-0" style="cursor: pointer;">1</a></li>
|
||||
<li id="$$html-id;-2" class="page-item"><a onclick="onPaginationClick(this)" class="page-link color-black bg-theme rounded-xs shadow-x1 border-0" style="cursor: pointer;">2</a></li>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
define('PWA_VERSION', '1.10.4');
|
||||
define('PWA_VERSION', '1.10.5h1');
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user