Tables reordering (and use pseudo-ranks for table level), plus some code reorg
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
Reference in New Issue
Block a user