Add a 'final' filter to registration page; coherence check on server for final and skipping
This commit is contained in:
@@ -260,7 +260,7 @@ onLoad(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
$('.toggle').on('click', e => {
|
||||
$('#search-form .toggle').on('click', e => {
|
||||
let chk = e.target.closest('.toggle');
|
||||
let checkbox = chk.find('input')[0];
|
||||
checkbox.checked = !checkbox.checked;
|
||||
@@ -269,6 +269,16 @@ onLoad(() => {
|
||||
store(id, value);
|
||||
initSearch();
|
||||
});
|
||||
$('#list-header .toggle').on('click', e => {
|
||||
let chk = e.target.closest('.toggle');
|
||||
let checkbox = chk.find('input')[0];
|
||||
checkbox.checked = !checkbox.checked;
|
||||
if (checkbox.checked) {
|
||||
$('td.reg-status:not(.final)').forEach(node => node.parentNode.addClass('filtered'));
|
||||
} else {
|
||||
$('td.reg-status:not(.final)').forEach(node => node.parentNode.removeClass('filtered'));
|
||||
}
|
||||
});
|
||||
document.on('click', e => {
|
||||
let resultLine = e.target.closest('.result-line');
|
||||
if (resultLine) {
|
||||
@@ -320,12 +330,12 @@ onLoad(() => {
|
||||
id: id,
|
||||
final: newStatus
|
||||
}).then(player => {
|
||||
if (player !== 'error') {
|
||||
cell.toggleClass('final');
|
||||
standingsUpToDate = false;
|
||||
pairablesUpToDate = false;
|
||||
}
|
||||
});
|
||||
if (player !== 'error') {
|
||||
cell.toggleClass('final');
|
||||
standingsUpToDate = false;
|
||||
pairablesUpToDate = false;
|
||||
}
|
||||
});
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
Reference in New Issue
Block a user