[Advanced Logbook] Added distance to batch edit

This commit is contained in:
Andreas Kristiansen
2025-04-07 19:10:38 +02:00
parent ebed76cbf1
commit a4eddfd816
3 changed files with 13 additions and 0 deletions

View File

@@ -739,6 +739,7 @@ class Logbookadvanced_model extends CI_Model {
case "clublogsent": $column = 'COL_CLUBLOG_QSO_UPLOAD_STATUS'; break;
case "clublogreceived": $column = 'COL_CLUBLOG_QSO_DOWNLOAD_STATUS'; break;
case "region": $column = 'COL_REGION'; break;
case "distance": $column = 'COL_DISTANCE'; break;
default: return;
}

View File

@@ -33,6 +33,7 @@
<option value="region"><?= __("Region"); ?></option>
<option value="clublogsent"><?= __("Clublog Sent"); ?></option>
<option value="clublogreceived"><?= __("Clublog Received"); ?></option>
<option value="distance"><?= __("Distance"); ?></option>
</select>
<div>&nbsp;</div>
@@ -192,4 +193,7 @@
<option value="SI"><?= __("Shetland Islands"); ?></option>
<option value="SY"><?= __("Sicily"); ?></option>
</select>
<label style="display:none" id="editDistanceInputLabel" class="mx-2 w-auto" for="editDistanceInput"><?= __("Distance (in km). Leave blank to remove distance."); ?></label>
<input style="display:none" class="form-control form-control-sm w-auto" id="editDistanceInput" type="text" name="editDistanceInput" placeholder="" aria-label="editDistanceInput">
</form>

View File

@@ -206,6 +206,9 @@ function saveBatchEditQsos(id_list) {
if (column == 'sota' || column == 'pota' || column == 'wwff' || column == 'gridsquare' || column == 'comment' || column == 'operator' || column == 'qslvia' || column == 'qslmsg' || column == 'stationpower') {
value = $("#editTextInput").val();
}
if (column == 'distance') {
value = $("#editDistanceInput").val();
}
$.ajax({
url: base_url + 'index.php/logbookadvanced/saveBatchEditQsos',
@@ -258,6 +261,8 @@ function changeEditType(type) {
$('#editEqsl').hide();
$('#editRegion').hide();
$('#editClublog').hide();
$('#editDistanceInputLabel').hide();
$('#editDistanceInput').hide();
if (type == "dxcc") {
$('#editDxcc').show();
} else if (type == "iota") {
@@ -309,6 +314,9 @@ function changeEditType(type) {
$('#editClublog').show();
} else if (type == "") {
$('#saveButton').prop("disabled", true);
} else if (type == "distance") {
$('#editDistanceInput').show();
$('#editDistanceInputLabel').show();
}
}