diff --git a/test.html b/test.html
index 8863ff3..1477b35 100644
--- a/test.html
+++ b/test.html
@@ -3,6 +3,32 @@
pyRCV2 test
+
@@ -66,7 +92,9 @@
// Exhausted votes row
elExhausted1 = document.createElement('tr');
+ elExhausted1.classList.add('info');
elExhausted2 = document.createElement('tr');
+ elExhausted2.classList.add('info');
elTd = document.createElement('td');
elTd.setAttribute('rowspan', '2');
@@ -79,8 +107,10 @@
// Quota row
elQuota = document.createElement('tr');
+ elQuota.classList.add('info');
elTd = document.createElement('td');
elTd.style.borderTop = '1px solid black';
+ elTd.style.borderBottom = '1px solid black';
elTd.innerText = 'Quota';
elQuota.appendChild(elTd);
tblResults.appendChild(elQuota);
@@ -98,6 +128,12 @@
[elTr1, elTr2] = candMap[candidate];
elTd = document.createElement('td');
+ elTd.classList.add('count');
+ if (countCard.state == py.pyRCV2.model.CandidateState.WITHDRAWN || countCard.state == py.pyRCV2.model.CandidateState.EXCLUDED) {
+ elTd.classList.add('excluded');
+ } else if (countCard.state == py.pyRCV2.model.CandidateState.ELECTED || countCard.state == py.pyRCV2.model.CandidateState.PROVISIONALLY_ELECTED) {
+ elTd.classList.add('elected');
+ }
elTd.style.borderTop = '1px solid black';
if (countCard.transfers != '0.00') {
elTd.innerText = countCard.transfers;
@@ -105,12 +141,18 @@
elTr1.appendChild(elTd);
elTd = document.createElement('td');
+ elTd.classList.add('count');
if (countCard.state == py.pyRCV2.model.CandidateState.WITHDRAWN) {
+ elTd.classList.add('excluded');
elTd.innerText = 'WD';
} else if (countCard.state == py.pyRCV2.model.CandidateState.ELECTED || countCard.state == py.pyRCV2.model.CandidateState.PROVISIONALLY_ELECTED) {
+ elTd.classList.add('elected');
elTd.innerText = countCard.votes;
elTd.style.fontWeight = 'bold';
+
+ elTr1.querySelector('td:first-child').classList.add('elected');
} else if (countCard.state == py.pyRCV2.model.CandidateState.EXCLUDED) {
+ elTd.classList.add('excluded');
elTd.innerText = 'EX';
} else {
elTd.innerText = countCard.votes;
@@ -120,6 +162,7 @@
// Display exhausted votes
elTd = document.createElement('td');
+ elTd.classList.add('count');
elTd.style.borderTop = '1px solid black';
if (result.exhausted.transfers != '0.00') {
elTd.innerText = result.exhausted.transfers;
@@ -127,12 +170,15 @@
elExhausted1.appendChild(elTd);
elTd = document.createElement('td');
+ elTd.classList.add('count');
elTd.innerText = result.exhausted.votes;
elExhausted2.appendChild(elTd);
// Display quota
elTd = document.createElement('td');
+ elTd.classList.add('count');
elTd.style.borderTop = '1px solid black';
+ elTd.style.borderBottom = '1px solid black';
elTd.innerText = result.quota;
elQuota.appendChild(elTd);
}