Pairing page: display stats at top, and persist scroll

This commit is contained in:
Claude Brisson
2024-01-30 15:27:33 +01:00
parent 41de7713e6
commit 727b341521
4 changed files with 17 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ country pays
d d
first name prénom
from de
games ) parties )
h h
in a way that best suits your needs. Here are your options: de la manière qui répond le mieux à vos besoin. Voici vos options :
instance graciously hosted by the French Go Federation. gracieusement hébergée par la Fédération Française de Go
@@ -138,6 +139,7 @@ online tournament tournoi en ligne
opengotha OpenGotha
or ou
pairable players joueurs disponibles
pairable, disponibles,
pairgoth pairgoth
pairing system, ideal for championships with no handicap games, as well as the , idéal pour les championnats sans handicap, ainsi que le système dappariement
pairing system, more suited for classical tournaments and cups. It is still in a beta stage. Future versions will support more pairing systems and more features. , plus adapté pour les tournois classiques et les coupes. Il en est encore à une phase « beta ». Les versions futures comporteront plus de systèmes dappariements et de fonctionnalités.
@@ -152,6 +154,7 @@ table table
the configuration guide le guide de configuration
to à
unpairable players joueurs non disponibles
unpairable, non disponibles,
version 0.1 supports the version 0.1 supporte le système dappariement
white blanc
White Blanc

View File

@@ -159,4 +159,16 @@ onLoad(()=>{
$('#update-pairable').on('click', e => {
updatePairable();
});
window.on('unload', e => {
console.log(store('unpairablesScroll'))
store('pairablesScroll', $('#pairables')[0].scrollTop);
store('unpairablesScroll', $('#unpairables')[0].scrollTop);
store('pairedScroll', $('#paired')[0].scrollTop);
});
console.log(store('unpairablesScroll'))
setTimeout(() => {
if (store.has('pairablesScroll')) $('#pairables')[0].scrollTop = store('pairablesScroll');
if (store.has('unpairablesScroll')) $('#unpairables')[0].scrollTop = store('unpairablesScroll');
if (store.has('pairedScroll')) $('#paired')[0].scrollTop = store('pairedScroll');
}, 0);
});

View File

@@ -20,6 +20,7 @@
<button class="ui floating choose-round prev-round button">&laquo;</button>
<span class="active-round">$round</span>
<button class="ui floating choose-round next-round button">&raquo;</button>
<span class="norbeak">( $pairables.size() pairable, $games.size() games )</span>
</div>
<div id="pairing-lists">
<div id="pairing-left">

View File

@@ -5,7 +5,7 @@
<span class="active-round">$round</span>
<button class="ui floating choose-round next-round button">&raquo;</button>
#set($stats = $utils.getResultsStats($games))
<span class="norbeak"><span id="known">$stats.known</span> / $stats.total</span>
<span class="norbeak">( <span id="known">$stats.known</span> / $stats.total )</span>
</div>
<div id="results-list" class="roundbox">
<table id="results-table" class="ui celled striped table">