Highlight names of elected candidates in web UI
This commit is contained in:
parent
de7a2ad20c
commit
baec51bd35
|
@ -48,7 +48,18 @@ worker.onmessage = function(evt) {
|
|||
|
||||
} else if (evt.data.type === 'updateResultsTable') {
|
||||
for (let i = 0; i < evt.data.result.length; i++) {
|
||||
tblResult.rows[i].insertAdjacentHTML('beforeend', evt.data.result[i]);
|
||||
if (evt.data.result[i]) {
|
||||
tblResult.rows[i].insertAdjacentHTML('beforeend', evt.data.result[i]);
|
||||
|
||||
// Update candidate status
|
||||
if (i >= 3 && i % 2 == 1) {
|
||||
if (tblResult.rows[i].lastElementChild.classList.contains('elected')) {
|
||||
tblResult.rows[i].cells[0].classList.add('elected');
|
||||
} else {
|
||||
tblResult.rows[i].cells[0].classList.remove('elected');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (evt.data.type === 'updateStageComments') {
|
||||
|
|
Loading…
Reference in New Issue