Skip to content

Commit

Permalink
Fix double team:xxx ID's
Browse files Browse the repository at this point in the history
  • Loading branch information
nickygerritsen committed Nov 22, 2024
1 parent eb5270e commit 106450c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions webapp/public/js/domjudge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions webapp/templates/partials/scoreboard_table.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
{% else %}
{% set color = score.team.category.color %}
{% endif %}
<tr class="{{ classes | join(' ') }}" id="team:{{ score.team.teamid }}">
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}">
{% if enable_ranking %}
<td class="scorepl {{medalColor}}">
{# Only print rank when score is different from the previous team #}
Expand Down Expand Up @@ -379,7 +379,7 @@
{% else %}
{% set color = score.team.category.color %}
{% endif %}
<tr class="{{ classes | join(' ') }}" id="team:{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;">
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;">
{% if enable_ranking %}
<td class="scorepl {{medalColor}}" rowspan="2">
{# Only print rank when score is different from the previous team #}
Expand Down

0 comments on commit 106450c

Please sign in to comment.