This commit is contained in:
RunasSudo 2021-01-05 20:28:31 +11:00
parent 784b21eac7
commit a0913c2d33
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 21 additions and 30 deletions

View File

@ -27,7 +27,6 @@
<div class="menudiv"> <div class="menudiv">
<input type="file" id="bltFile"> <input type="file" id="bltFile">
<button onclick="clickCount()">Count</button> <button onclick="clickCount()">Count</button>
<i class="sep"></i>
<label> <label>
Preset: Preset:
<select id="selPreset" onchange="changePreset()"> <select id="selPreset" onchange="changePreset()">
@ -39,15 +38,13 @@
<option value="ers97">ERS97</option> <option value="ers97">ERS97</option>
</select> </select>
</label> </label>
<i class="sep"></i>
<button id="btnAdvancedOptions" onclick="clickAdvancedOptions()">Show advanced options</button> <button id="btnAdvancedOptions" onclick="clickAdvancedOptions()">Show advanced options</button>
<!--GITREV--> <!--GITREV-->
<i class="sep"></i>
<a href="https://yingtongli.me/blog/2020/12/24/pyrcv2.html">Information and instructions</a> <a href="https://yingtongli.me/blog/2020/12/24/pyrcv2.html">Information and instructions</a>
</div> </div>
<div id="divAdvancedOptions" class="menudiv" style="display: none;"> <div id="divAdvancedOptions" class="menudiv" style="display: none;">
<label> <label class="padafter">
Numbers: Numbers:
<select id="selNumbers"> <select id="selNumbers">
<option value="native">Native</option> <option value="native">Native</option>
@ -55,7 +52,6 @@
<option value="fixed" selected>Fixed</option> <option value="fixed" selected>Fixed</option>
</select> </select>
</label> </label>
<i class="sep"></i>
<label> <label>
Decimal places (if Numbers = Fixed): Decimal places (if Numbers = Fixed):
<input type="number" id="txtDP" value="5" style="width: 3em;"> <input type="number" id="txtDP" value="5" style="width: 3em;">
@ -76,25 +72,22 @@
<option value="hare_exact">Hare (exact)</option> <option value="hare_exact">Hare (exact)</option>
</select> </select>
</label> </label>
<label> <label class="padafter">
<select id="selQuotaMode"> <select id="selQuotaMode">
<option value="static" selected>Static quota</option> <option value="static" selected>Static quota</option>
<option value="progressive">Progressive quota</option> <option value="progressive">Progressive quota</option>
<option value="ers97">Static with ERS97 rules</option> <option value="ers97">Static with ERS97 rules</option>
</select> </select>
</label> </label>
<i class="sep"></i> <label class="padafter">
<label>
<input type="checkbox" id="chkBulkElection" checked> <input type="checkbox" id="chkBulkElection" checked>
Bulk election Bulk election
</label> </label>
<i class="sep"></i> <label class="padafter">
<label>
<input type="checkbox" id="chkBulkExclusion"> <input type="checkbox" id="chkBulkExclusion">
Bulk exclusion Bulk exclusion
</label> </label>
<i class="sep"></i> <label class="padafter">
<label>
<input type="checkbox" id="chkDeferSurpluses"> <input type="checkbox" id="chkDeferSurpluses">
Defer surpluses Defer surpluses
</label> </label>
@ -103,29 +96,26 @@
<input type="checkbox" id="chkRoundQuota" checked> <input type="checkbox" id="chkRoundQuota" checked>
Round quota to Round quota to
</label> </label>
<label> <label class="padafter">
<input type="number" id="txtRoundQuota" value="0" min="0" style="width: 3em;"> <input type="number" id="txtRoundQuota" value="0" min="0" style="width: 3em;">
d.p. d.p.
</label> </label>
<i class="sep"></i>
<label> <label>
<input type="checkbox" id="chkRoundVotes"> <input type="checkbox" id="chkRoundVotes">
Round votes to Round votes to
</label> </label>
<label> <label class="padafter">
<input type="number" id="txtRoundVotes" value="0" min="0" style="width: 3em;"> <input type="number" id="txtRoundVotes" value="0" min="0" style="width: 3em;">
d.p. d.p.
</label> </label>
<i class="sep"></i>
<label> <label>
<input type="checkbox" id="chkRoundTVs"> <input type="checkbox" id="chkRoundTVs">
Round transfer values to Round transfer values to
</label> </label>
<label> <label class="padafter">
<input type="number" id="txtRoundTVs" value="0" min="0" style="width: 3em;"> <input type="number" id="txtRoundTVs" value="0" min="0" style="width: 3em;">
d.p. d.p.
</label> </label>
<i class="sep"></i>
<label> <label>
<input type="checkbox" id="chkRoundWeights"> <input type="checkbox" id="chkRoundWeights">
Round ballot weights to Round ballot weights to
@ -135,14 +125,13 @@
d.p. d.p.
</label> </label>
<br> <br>
<label> <label class="padafter">
Surplus order: Surplus order:
<select id="selSurplus"> <select id="selSurplus">
<option value="size" selected>By size</option> <option value="size" selected>By size</option>
<option value="order">By order</option> <option value="order">By order</option>
</select> </select>
</label> </label>
<i class="sep"></i>
<label> <label>
Method: Method:
<select id="selTransfers"> <select id="selTransfers">
@ -152,13 +141,14 @@
<option value="wright">Wright STV</option> <option value="wright">Wright STV</option>
</select> </select>
</label> </label>
<label> <label class="padafter">
<select id="selPapers"> <select id="selPapers">
<option value="both" selected>Include non-transferable papers</option> <option value="both" selected>Include non-transferable papers</option>
<option value="transferable">Use transferable papers only</option> <option value="transferable">Use transferable papers only</option>
</select> </select>
</label> </label>
<label> <label>
Exclusion:
<select id="selExclusion"> <select id="selExclusion">
<option value="one_round" selected>Exclude in one round</option> <option value="one_round" selected>Exclude in one round</option>
<option value="parcels_by_order">Exclude by parcel (by order)</option> <option value="parcels_by_order">Exclude by parcel (by order)</option>
@ -168,7 +158,7 @@
</select> </select>
</label> </label>
<br> <br>
<label> <label class="padafter">
Ties: Ties:
<select id="selTies"> <select id="selTies">
<option value="backwards_random" selected>Backwards then random</option> <option value="backwards_random" selected>Backwards then random</option>
@ -177,7 +167,6 @@
<option value="prompt">Prompt</option> <option value="prompt">Prompt</option>
</select> </select>
</label> </label>
<i class="sep"></i>
<label> <label>
Random seed: Random seed:
<input type="text" id="txtSeed" value=""> <input type="text" id="txtSeed" value="">

View File

@ -26,11 +26,6 @@ body {
/* Menu styling */ /* Menu styling */
i.sep::after {
content: "•";
color: #ccc;
}
.menudiv { .menudiv {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
line-height: 1.8; line-height: 1.8;
@ -117,10 +112,10 @@ input[type="file"]::file-selector-button {
padding: 2px 10px; padding: 2px 10px;
} }
button:hover, input[type="file"]::file-selector-button:hover { button:hover, input[type="file"]::file-selector-button:hover {
background-color: #eaeaea; background-color: #f5f5f5;
} }
button:active, input[type="file"]::file-selector-button:active { button:active, input[type="file"]::file-selector-button:active {
background-color: #dfdfdf; background-color: #eaeaea;
border-color: #999 #bbb #ddd; border-color: #999 #bbb #ddd;
} }
@ -146,3 +141,10 @@ button:focus, select:focus, input:focus {
select:focus, input:focus { select:focus, input:focus {
border-color: #3daee9; border-color: #3daee9;
} }
label {
white-space: nowrap;
}
label.padafter {
margin-right: 1.5em;
}