Skip to content
Permalink
Browse files

Fix color issue for HC buttons on HF

The HIT Catcher buttons on HIT Finder would not change color after being
clicked for some users. This change should fix that issue.
  • Loading branch information...
chasegeaton committed May 16, 2019
1 parent 08d5b0b commit 29533b758510cd7701507b1326a47e93c6fd1936
Showing with 8 additions and 5 deletions.
  1. +8 −5 hit-finder/hit-finder.js
@@ -983,14 +983,17 @@ $(`body`).on(`click`, `.hit-catcher`, async (event) => {

const includedRow = document.getElementById(`included-${hit.hit_set_id}`);
if (includedRow) {
includedRow.children[7].firstChild.children[elem].classList.add(`bg-secondary`);
includedRow.children[7].firstChild.children[elem].classList
.replace(`btn-primary`, `btn-secondary`);
}

document.getElementById(`recent-${hit.hit_set_id}`).children[7]
.firstChild.children[elem].classList.add(`bg-secondary`);
document.getElementById(`recent-${hit.hit_set_id}`)
.children[7].firstChild.children[elem].classList
.replace(`btn-primary`, `btn-secondary`);

document.getElementById(`logged-${hit.hit_set_id}`).children[7]
.firstChild.children[elem].classList.add(`bg-secondary`);
const loggedClassList = document.getElementById(`logged-${hit.hit_set_id}`)
.children[7].firstChild.children[elem].classList
.replace(`btn-primary`, `btn-secondary`);
}
});

0 comments on commit 29533b7

Please sign in to comment.
You can’t perform that action at this time.