mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Toggle to allow DXpeditions to be displayed even if they exceed max_duration. Closes #17
This commit is contained in:
@@ -30,6 +30,9 @@ function buildQueryString() {
|
||||
if (maxDur != "9999999999") {
|
||||
str = str + "&max_duration=" + maxDur;
|
||||
}
|
||||
if ($("#dxpeditions_skip_max_duration_check")[0].checked) {
|
||||
str = str + "&dxpeditions_skip_max_duration_check=true";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -210,7 +213,7 @@ function generateMaxDurationDropdownFilterCard(band_options) {
|
||||
let $col = $("<div class='col'>")
|
||||
let $card = $("<div class='card'>");
|
||||
let $card_body = $("<div class='card-body'>");
|
||||
$card_body.append(`<h5 class='card-title'>Duration Limit</h5>`);
|
||||
$card_body.append(`<h5 class='card-title'>Duration Limit <i class='fa-solid fa-circle-question' title='Some users create long-duration alerts for the period they will be generally in and around xOTA references, when they are not indending to be on the air most of the time. Use this control to restrict the maximum duration of spots that the software will display, and exclude any with a long duration, to avoid these filling up the list. By default, we allow DXpeditions to be displayed even if they are longer than this limit, because on a DXpedition the operators typically ARE on the air most of the time.'></i></h5>`);
|
||||
$p = $("<p class='card-text filter-card-text'>");
|
||||
$p.append("Hide any alerts lasting more than:<br/>");
|
||||
$p.append(`<select id="max-duration" class="storeable-select form-select" onclick="filtersUpdated();" style="width: 8em; display: inline-block;">
|
||||
@@ -221,9 +224,12 @@ function generateMaxDurationDropdownFilterCard(band_options) {
|
||||
<option value="2419200">4 weeks</option>
|
||||
<option value="9999999999">No limit</option>
|
||||
</select>`);
|
||||
$p.append(" <i class='fa-solid fa-circle-question' title='Some users create long-duration alerts for the period they will be generally in and around xOTA references, not just the times they are specifically on the air. Use this control to restrict the maximum duration of spots that the software will display, and exclude any with a long duration.'></i>");
|
||||
|
||||
$p2 = $("<p class='card-text filter-card-text' style='line-height: 1.5em !important;'>");
|
||||
$p2.append(`<input class="form-check-input storeable-checkbox" type="checkbox" value="" onclick="filtersUpdated();" id="dxpeditions_skip_max_duration_check" checked><label class="form-check-label ms-2" for="dxpeditions_skip_max_duration_check">Allow DXpeditions that are longer</label>`);
|
||||
// Compile HTML elements to return
|
||||
$card_body.append($p);
|
||||
$card_body.append($p2);
|
||||
$card.append($card_body);
|
||||
$col.append($card);
|
||||
return $col;
|
||||
|
||||
Reference in New Issue
Block a user