mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Update only for single zone qsos
This commit is contained in:
@@ -260,7 +260,14 @@ function check_incorrect_cq_zones($result, $custom_date_format) { ?>
|
||||
<h5><?= __("CQ Zone Check Results") ?></h5>
|
||||
<?php if ($result) {
|
||||
echo __("The following QSOs were found to have a different CQ zone compared to what this DXCC normally has (a maximum of 5000 QSOs are shown):"); ?>
|
||||
<br />
|
||||
<br /><br />
|
||||
<div class="col-md-12">
|
||||
<div class="form-check form-check-lg border rounded p-3 bg-light h-100">
|
||||
<input class="form-check-input me-2" type="checkbox" id="forceMultiZoneUpdate" />
|
||||
<?= __("Force update even if DXCC covers multiple CQ zones") ?>
|
||||
<div class="d-block mb-1 alert-danger"><?= __("The update function can only set the main CQ zone which is assigned to the DXCC. If the DXCC covers multiple CQ zones there is a chance that this is not correct. So by default only QSOs with DXCCs covering a single CQ zone are updated. This checkbox overrides this but might result in wrong data. Use with caution!"); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="mt-2 mb-2 btn btn-sm btn-primary ld-ext-right" id="fixSelectedCqZoneBtn" onclick="fixCqZoneSelected(true)">
|
||||
<?= __("Update selected") ?><div class="ld ld-ring ld-spin"></div>
|
||||
</button>
|
||||
@@ -294,7 +301,7 @@ function check_incorrect_cq_zones($result, $custom_date_format) { ?>
|
||||
echo '<td style=\'text-align: center\'>'; if($qso->COL_SAT_NAME != null) { echo $qso->COL_SAT_NAME; } else { echo strtolower($qso->COL_BAND); }; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; echo strlen($qso->COL_GRIDSQUARE ?? '')==0?$qso->COL_VUCC_GRIDS:$qso->COL_GRIDSQUARE; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qso->COL_CQZ . '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qso->correctcqzone . '</td>';
|
||||
echo '<td id=\'cqZones\' style=\'text-align: center\'>' . $qso->correctcqzone . '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . ucwords(strtolower($qso->COL_COUNTRY), "- (/") . '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qso->station_profile_name . '</td>';
|
||||
echo '</tr>';
|
||||
@@ -334,7 +341,7 @@ function check_incorrect_itu_zones($result, $custom_date_format) { ?>
|
||||
<div class="form-check form-check-lg border rounded p-3 bg-light h-100">
|
||||
<input class="form-check-input me-2" type="checkbox" id="forceMultiZoneUpdate" />
|
||||
<?= __("Force update even if DXCC covers multiple ITU zones") ?>
|
||||
<div class="d-block mb-1 alert-danger"><?= __("The update function can only set the main ITU zone which is assigned to the DXCC. If the DXCC covers multiple ITU zones there is a chance that this is not correct. So by default only QSOs with DXCCs covering a single ITU zone are updated. This checkbox overrides this but might result in wrong data. USe with caution!"); ?></div>
|
||||
<div class="d-block mb-1 alert-danger"><?= __("The update function can only set the main ITU zone which is assigned to the DXCC. If the DXCC covers multiple ITU zones there is a chance that this is not correct. So by default only QSOs with DXCCs covering a single ITU zone are updated. This checkbox overrides this but might result in wrong data. Use with caution!"); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="mt-2 mb-2 btn btn-sm btn-primary ld-ext-right" id="fixSelectedItuZoneBtn" onclick="fixItuZoneSelected(true)">
|
||||
|
||||
@@ -2711,12 +2711,18 @@ function saveOptions() {
|
||||
$('#checkBoxAllCqZones').change(function (event) {
|
||||
if (this.checked) {
|
||||
$('#incorrectcqzonetable tbody tr').each(function (i) {
|
||||
selectQsoIdDxcc($(this).first().closest('tr').attr('id')?.replace(/\D/g, ''), 'incorrectcqzonetable');
|
||||
if (!$(this).first().closest('tr').find("td[id='cqZones']").text().includes(',') || $('#forceMultiZoneUpdate').prop("checked")) {
|
||||
selectQsoIdDxcc($(this).first().closest('tr').attr('id')?.replace(/\D/g, ''), 'incorrectcqzonetable');
|
||||
}
|
||||
});
|
||||
if (!$('#forceMultiZoneUpdate').prop("checked")) {
|
||||
$('#incorrectcqzonetable').DataTable().column(8).search('^[^,]*$', true, false).draw();
|
||||
}
|
||||
} else {
|
||||
$('#incorrectcqzonetable tbody tr').each(function (i) {
|
||||
unselectQsoIdDxcc($(this).first().closest('tr').attr('id')?.replace(/\D/g, ''), 'incorrectcqzonetable');
|
||||
});
|
||||
$('#incorrectcqzonetable').DataTable().column(8).search('').draw();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2865,7 +2871,10 @@ function saveOptions() {
|
||||
let id_list = [];
|
||||
$('#incorrectcqzonetable tbody input:checked').each(function () {
|
||||
let id = $(this).closest('tr').attr('id')?.replace(/\D/g, '');
|
||||
id_list.push(id);
|
||||
// Skip entry if DXCC covers multiple CQ zones as the matching one cannot be identified automagically atm or force update
|
||||
if (!$(this).closest('tr').find("td[id='cqZones']").text().includes(',') || $('#forceMultiZoneUpdate').prop("checked")) {
|
||||
id_list.push(id);
|
||||
}
|
||||
});
|
||||
|
||||
if (id_list.length === 0) {
|
||||
@@ -2881,6 +2890,8 @@ function saveOptions() {
|
||||
return;
|
||||
}
|
||||
|
||||
let table = $('#incorrectcqzonetable').DataTable();
|
||||
|
||||
$('#fixSelectedCqZoneBtn').prop("disabled", true).addClass("running");
|
||||
$('#closeButton').prop("disabled", true);
|
||||
|
||||
@@ -2893,7 +2904,8 @@ function saveOptions() {
|
||||
$('#closeButton').prop("disabled", false);
|
||||
id_list.forEach(function(id) {
|
||||
let row = $("#incorrectcqzonetable tbody tr#qsoID-" + id);
|
||||
row.remove();
|
||||
table.row(row).remove();
|
||||
table.draw(false);
|
||||
});
|
||||
$('.dxcctablediv').html(data.message);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user