Skip to content

Commit 706fc05

Browse files
Fix double team:xxx ID's
1 parent 108970b commit 706fc05

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

webapp/public/js/domjudge.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@ function getHeartCol(row) {
246246

247247
function getTeamname(row)
248248
{
249-
var res = row.getAttribute("id");
250-
if ( res === null ) return res;
251-
return res.replace(/^team:/, '');
249+
return row.getAttribute("data-team-id");
252250
}
253251

254252
function toggle(id, show)

webapp/templates/partials/scoreboard_table.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
{% else %}
134134
{% set color = score.team.category.color %}
135135
{% endif %}
136-
<tr class="{{ classes | join(' ') }}" id="team:{{ score.team.teamid }}">
136+
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}">
137137
{% if enable_ranking %}
138138
<td class="scorepl {{medalColor}}">
139139
{# Only print rank when score is different from the previous team #}
@@ -379,7 +379,7 @@
379379
{% else %}
380380
{% set color = score.team.category.color %}
381381
{% endif %}
382-
<tr class="{{ classes | join(' ') }}" id="team:{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;">
382+
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;">
383383
{% if enable_ranking %}
384384
<td class="scorepl {{medalColor}}" rowspan="2">
385385
{# Only print rank when score is different from the previous team #}

0 commit comments

Comments
 (0)