Tables reordering (and use pseudo-ranks for table level), plus some code reorg

This commit is contained in:
Claude Brisson
2024-01-31 11:29:10 +01:00
parent 0f9afbcc65
commit b8f8d45e57
7 changed files with 195 additions and 122 deletions

View File

@@ -18,6 +18,15 @@ function unpair(games) {
});
}
function renumberTables() {
api.putJson(`tour/${tour_id}/pair/${activeRound}`, {})
.then(rst => {
if (rst !== 'error') {
document.location.reload();
}
});
}
function editGame(game) {
let t = game.find('.table');
let w = game.find('.white');
@@ -115,6 +124,9 @@ onLoad(()=>{
}
unpair(games);
});
$('#renumber-tables').on('click', e => {
renumberTables();
});
$('#pairing-form [name]').on('input', e => {
$('#update-pairing').removeClass('disabled');
});