Merge remote-tracking branch 'upstream/dev' into cronmanager

This commit is contained in:
HB9HIL
2024-04-26 15:12:30 +02:00
3 changed files with 12 additions and 3 deletions

View File

@@ -381,10 +381,10 @@ class Logbookadvanced extends CI_Controller {
foreach ($qsos as $qso) {
if (!empty($qso['COL_MY_GRIDSQUARE']) || !empty($qso['COL_MY_VUCC_GRIDS'])) {
if (!empty($qso['COL_GRIDSQUARE']) || !empty($qso['COL_VUCC_GRIDS'])) {
$mappedcoordinates[] = $this->calculate($qso, ($qso['COL_MY_GRIDSQUARE'] ?? '') == '' ? $qso['COL_MY_VUCC_GRIDS'] : $qso['COL_MY_GRIDSQUARE'], ($qso['COL_GRIDSQUARE'] ?? '') == '' ? $qso['COL_VUCC_GRIDS'] : $qso['COL_GRIDSQUARE'], $measurement_base, $var_dist, $custom_date_format);
$mappedcoordinates[] = $this->calculate($qso, ($qso['station_gridsquare'] ?? ''), ($qso['COL_GRIDSQUARE'] ?? '') == '' ? $qso['COL_VUCC_GRIDS'] : $qso['COL_GRIDSQUARE'], $measurement_base, $var_dist, $custom_date_format);
} else {
if (!empty($qso['lat']) || !empty($qso['long'])) {
$mappedcoordinates[] = $this->calculateCoordinates($qso, $qso['lat'], $qso['long'], ($qso['COL_MY_GRIDSQUARE'] ?? '') == '' ? $qso['COL_MY_VUCC_GRIDS'] : $qso['COL_MY_GRIDSQUARE'], $measurement_base, $var_dist, $custom_date_format);
$mappedcoordinates[] = $this->calculateCoordinates($qso, $qso['lat'], $qso['long'], ($qso['station_gridsquare'] ?? ''), $measurement_base, $var_dist, $custom_date_format);
}
}
}

View File

@@ -1258,6 +1258,12 @@ class Logbook_model extends CI_Model {
$lotwrdate = $qso->COL_LOTW_QSLRDATE;
}
if ($this->input->post('distance')) {
$distance = $this->input->post('distance');
} else {
$distance = null;
}
$data = array(
'COL_TIME_ON' => $this->input->post('time_on'),
'COL_TIME_OFF' => $this->input->post('time_off'),
@@ -1271,7 +1277,7 @@ class Logbook_model extends CI_Model {
'COL_RST_SENT' => $this->input->post('rst_sent'),
'COL_GRIDSQUARE' => strtoupper(trim($this->input->post('locator'))),
'COL_VUCC_GRIDS' => strtoupper(preg_replace('/\s+/', '', $this->input->post('vucc_grids'))),
'COL_DISTANCE' => $this->input->post('distance'),
'COL_DISTANCE' => $distance,
'COL_COMMENT' => $this->input->post('comment'),
'COL_NAME' => $this->input->post('name'),
'COL_COUNTRY' => $country,

View File

@@ -246,6 +246,9 @@ function qso_edit(id) {
document.getElementById("distance").value = null;
},
});
} else if ($(this).val().length == 0) {
$('#locator_info').fadeOut("slow");
document.getElementById("distance").value = null;
}
});