allow to exclude discarded contracts from selection
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
<input id="hops" type="checkbox" checked="checked"/><label for="hops">Hops</label>
|
||||
</div>
|
||||
|
||||
<div id="other" class="filters">
|
||||
<span>Other:</span>
|
||||
<input id="discarded" type="checkbox" checked="checked"/><label for="discarded">Discarded</label>
|
||||
</div>
|
||||
|
||||
<div id="included">
|
||||
</div>
|
||||
<hr style="clear: left;height:5px;border-width:0;color:gray;background-color:darkgoldenrod"/>
|
||||
|
||||
7
index.ts
7
index.ts
@@ -26,6 +26,10 @@ function init() {
|
||||
update();
|
||||
});
|
||||
}
|
||||
let otherCheckBox = document.getElementById("discarded");
|
||||
otherCheckBox.addEventListener('change', function () {
|
||||
update();
|
||||
});
|
||||
}
|
||||
|
||||
function update() {
|
||||
@@ -56,6 +60,9 @@ function isIncluded(contract) {
|
||||
included = false;
|
||||
}
|
||||
}
|
||||
if (!(document.getElementById("discarded") as HTMLInputElement).checked && contract.discarded) {
|
||||
included = false;
|
||||
}
|
||||
return included;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user