Skip to content

Commit d6572cc

Browse files
committed
refactor: remove jquery in modals/edit-result-tags
1 parent 56a8e6b commit d6572cc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

frontend/src/ts/modals/edit-result-tags.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as ConnectionState from "../states/connection";
77
import { areUnsortedArraysEqual } from "../utils/arrays";
88
import * as TestResult from "../test/result";
99
import AnimatedModal from "../utils/animated-modal";
10+
import { qsa } from "../utils/dom";
1011

1112
type State = {
1213
resultId: string;
@@ -90,12 +91,12 @@ function appendButtons(): void {
9091
}
9192

9293
function updateActiveButtons(): void {
93-
for (const button of $("#editResultTagsModal .modal .buttons button")) {
94-
const tagid: string = $(button).attr("data-tag-id") ?? "";
94+
for (const button of qsa("#editResultTagsModal .modal .buttons button")) {
95+
const tagid: string = button.getAttribute("data-tag-id") ?? "";
9596
if (state.tags.includes(tagid)) {
96-
$(button).addClass("active");
97+
button.addClass("active");
9798
} else {
98-
$(button).removeClass("active");
99+
button.removeClass("active");
99100
}
100101
}
101102
}

0 commit comments

Comments
 (0)