diff --git a/webapp/public/js/domjudge.js b/webapp/public/js/domjudge.js index ab0165643a..f1cd094720 100644 --- a/webapp/public/js/domjudge.js +++ b/webapp/public/js/domjudge.js @@ -443,10 +443,11 @@ function initFavouriteTeams() } } scoreboard[j].style.background = "lightyellow"; - const scoretn = scoreboard[j].querySelector('.scoretn'); - if (scoretn && scoretn.classList.contains('cl_FFFFFF')) { - scoretn.classList.remove('cl_FFFFFF'); - scoretn.classList.add('cl_FFFFE0'); + const whiteCells = scoreboard[j].querySelectorAll('.cl_FFFFFF'); + for (let k = 0; k < whiteCells.length; k++) { + const whiteCell = whiteCells[k]; + whiteCell.classList.remove('cl_FFFFFF'); + whiteCell.classList.add('cl_FFFFE0'); } if (mobile) { scoreboard[j + 1].style.background = "lightyellow"; diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index 2a983a5a6a..6b2da2f314 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -162,7 +162,14 @@ {% set previousTeam = score.team %} {% endif %} - + {% if color is null %} + {% set color = "#FFFFFF" %} + {% set colorClass = "_FFFFFF" %} + {% else %} + {% set colorClass = color | replace({"#": "_"}) %} + {% set backgroundColors = backgroundColors | merge({(color): 1}) %} + {% endif %} + {% if showFlags %} {% if score.team.affiliation %} {% set link = null %} @@ -176,7 +183,7 @@ {% endif %} {% if showAffiliationLogos %} - + {% if score.team.affiliation %} {% set link = null %} {% if jury %} @@ -197,14 +204,7 @@ {% endif %} {% if public %} - - {% endif %} - {% if color is null %} - {% set color = "#FFFFFF" %} - {% set colorClass = "_FFFFFF" %} - {% else %} - {% set colorClass = color | replace({"#": "_"}) %} - {% set backgroundColors = backgroundColors | merge({(color): 1}) %} + {% endif %} {% set link = null %} @@ -411,7 +411,13 @@ {% endif %} {% endif %} - + {% if color is null %} + {% set color = "#FFFFFF" %} + {% set colorClass = "_FFFFFF" %} + {% else %} + {% set colorClass = color | replace({"#": "_"}) %} + {% endif %} + {% if showFlags %} {% if score.team.affiliation %} {% set link = null %} @@ -425,7 +431,7 @@ {% endif %} {% if showAffiliationLogos %} - + {% if score.team.affiliation %} {% set link = null %} {% if jury %} @@ -446,13 +452,7 @@ {% endif %} {% if public %} - - {% endif %} - {% if color is null %} - {% set color = "#FFFFFF" %} - {% set colorClass = "_FFFFFF" %} - {% else %} - {% set colorClass = color | replace({"#": "_"}) %} + {% endif %} {% set link = null %}