diff --git a/view-webapp/src/main/sass/main.scss b/view-webapp/src/main/sass/main.scss index 7dca0dd..ea24d1b 100644 --- a/view-webapp/src/main/sass/main.scss +++ b/view-webapp/src/main/sass/main.scss @@ -509,7 +509,7 @@ margin-top: 0.1em !important; } - #logo, #lang, .steps, #filter-box, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle { + #logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle { display: none !important; } diff --git a/view-webapp/src/main/sass/tour.scss b/view-webapp/src/main/sass/tour.scss index 044fdf1..804e060 100644 --- a/view-webapp/src/main/sass/tour.scss +++ b/view-webapp/src/main/sass/tour.scss @@ -285,6 +285,10 @@ /* results section */ + #results-filter { + margin-left: 2em; + } + #results-list { text-align: center; .player, .result { diff --git a/view-webapp/src/main/webapp/js/tour-results.inc.js b/view-webapp/src/main/webapp/js/tour-results.inc.js index ec1508d..1baa3dc 100644 --- a/view-webapp/src/main/webapp/js/tour-results.inc.js +++ b/view-webapp/src/main/webapp/js/tour-results.inc.js @@ -53,12 +53,13 @@ onLoad(()=>{ let newResult = results[(index + 1)%results.length]; setResult(gameId, newResult, oldResult); }); - $('#filter').on('click', e=>{ - let filter = $('#filter-results')[0].checked; - if (filter) { - $('#results-table tr').filter(':not(:has(td.result[data-result="?"]))').addClass('filtered'); + $('#results-filter').on('click', e => { + let filter = $('#results-filter input')[0]; + filter.checked = !filter.checked; + if (filter.checked) { + $('#results-table tbody tr').filter(':not(:has(td.result[data-result="?"]))').addClass('filtered'); } else { - $('#results-table tr').removeClass('filtered'); + $('#results-table tbody tr').removeClass('filtered'); } }); }); diff --git a/view-webapp/src/main/webapp/tour-results.inc.html b/view-webapp/src/main/webapp/tour-results.inc.html index 569796d..ed2845d 100644 --- a/view-webapp/src/main/webapp/tour-results.inc.html +++ b/view-webapp/src/main/webapp/tour-results.inc.html @@ -6,8 +6,8 @@ #set($stats = $utils.getResultsStats($games)) ( $stats.known / $stats.total ) -
table | +table | white | black | result | @@ -29,7 +29,7 @@ #set($black = $pmap[$game.b]) #if($black && $white)
---|---|---|---|---|
#$game.t | +#$game.t | #if($white)$white.name $white.firstname #rank($white.rank)#{else}BIP#end | #if($black)$black.name $black.firstname #rank($black.rank)#{else}BIP#end | $dispRst[$game.r] |