Style condorcet results

This commit is contained in:
David Benque 2023-04-18 17:27:23 +01:00
parent c8cef7c40d
commit fc8534d339
2 changed files with 14 additions and 3 deletions

View File

@ -679,6 +679,12 @@
line-height: 31px;
}
}
.cp-form-result-details {
margin: 10px 0px;
&> * {
margin-right: 0.5em;
}
}
&.editable {
&:not(.nodrag) { cursor: grab; }
.cp-form-edit-save {

View File

@ -76,10 +76,10 @@ define([
)
{
Messages.form_showCondorcetMethod = "Condorcet method "; //XXX;
Messages.form_showCondorcetMethod = "Condorcet method"; //XXX;
Messages.form_condorcetSchulze = "Schulze";
Messages.form_condorcetRanked = "Ranked Pairs";
Messages.form_showCondorcetWinner = " winner: ";
Messages.form_showCondorcetWinner = "winner: ";
Messages.form_showDetails = "Details";
Messages.form_condorcetExtendedDisplay = "Number of matches won by each candidate: ";
Messages.form_noCondorcetWinner = "No winner";
@ -2986,7 +2986,12 @@ define([
$('#dD').replaceWith(h('details', h('summary', Messages.form_showDetails), {id: 'dD'}, Messages.form_condorcetExtendedDisplay, h('div', calculateCondorcet()[1].join(', '))));
});
condorcetWinnerDiv.append(h('div', Messages.form_showCondorcetMethod, method, Messages.form_showCondorcetWinner, condorcetWinner, detailsDiv, {style: {margin: '10px'}}));
condorcetWinnerDiv.append(h('div.cp-form-result-details', [
h('span', Messages.form_showCondorcetMethod),
method,
h('span', Messages.form_showCondorcetWinner, condorcetWinner),
detailsDiv
]));
}