From 1de27f078b9b3307b76225d84f055b422942b5cc Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 22 Nov 2024 13:45:38 +0100 Subject: [PATCH] Fix double team:xxx ID's --- webapp/public/js/domjudge.js | 4 +--- webapp/templates/partials/scoreboard_table.html.twig | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/webapp/public/js/domjudge.js b/webapp/public/js/domjudge.js index b41497676b..c0fe0496aa 100644 --- a/webapp/public/js/domjudge.js +++ b/webapp/public/js/domjudge.js @@ -246,9 +246,7 @@ function getHeartCol(row) { function getTeamname(row) { - var res = row.getAttribute("id"); - if ( res === null ) return res; - return res.replace(/^team:/, ''); + return row.getAttribute("data-team-id"); } function toggle(id, show) diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index 5077ca53f3..3d0d9f9607 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -133,7 +133,7 @@ {% else %} {% set color = score.team.category.color %} {% endif %} - + {% if enable_ranking %} {# Only print rank when score is different from the previous team #} @@ -379,7 +379,7 @@ {% else %} {% set color = score.team.category.color %} {% endif %} - + {% if enable_ranking %} {# Only print rank when score is different from the previous team #}