mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2033 from AndreasK79/lba_qth
This commit is contained in:
@@ -567,6 +567,7 @@ class Logbookadvanced extends CI_Controller {
|
||||
$json_string['antennaazimuth']['show'] = $this->def_boolean($this->input->post('antennaazimuth'));
|
||||
$json_string['antennaelevation']['show'] = $this->def_boolean($this->input->post('antennaelevation'));
|
||||
$json_string['region']['show'] = $this->def_boolean($this->input->post('region'));
|
||||
$json_string['qth']['show'] = $this->def_boolean($this->input->post('qth'));
|
||||
|
||||
$obj['column_settings']= json_encode($json_string);
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
\"antennaazimuth\":{\"show\":\"true\"},
|
||||
\"antennaelevation\":{\"show\":\"true\"},
|
||||
\"county\":{\"show\":\"true\"},
|
||||
\"qth\":{\"show\":\"true\"},
|
||||
}";
|
||||
}
|
||||
$current_opts = json_decode($options);
|
||||
@@ -161,6 +162,10 @@
|
||||
echo "\nvar o_template = { county: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
if (!isset($current_opts->qth)) {
|
||||
echo "\nvar o_template = { qth: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
|
||||
|
||||
foreach ($mapoptions as $mo) {
|
||||
@@ -692,6 +697,9 @@ $options = json_decode($options);
|
||||
} ?>
|
||||
<?php if (($options->name->show ?? "true") == "true") {
|
||||
echo '<th>' . __("Name") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->qth->show ?? "true") == "true") {
|
||||
echo '<th>' . __("QTH") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->qslvia->show ?? "true") == "true") {
|
||||
echo '<th>' . __("QSL via") . '</th>';
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<td><?= __("Name"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="name" type="checkbox" <?php if (($options->name->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __("QTH"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="qth" type="checkbox" <?php if (($options->qth->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __("QSL via"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="qslvia" type="checkbox" <?php if (($options->qslvia->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
|
||||
@@ -65,6 +65,9 @@ function updateRow(qso) {
|
||||
if ((user_options.name.show ?? 'true') == "true"){
|
||||
cells.eq(c++).text(qso.name);
|
||||
}
|
||||
if ((user_options.qth.show ?? 'true') == "true"){
|
||||
cells.eq(c++).text(qso.qth);
|
||||
}
|
||||
if ((user_options.qslvia.show ?? 'true') == "true"){
|
||||
cells.eq(c++).text(qso.qslVia);
|
||||
}
|
||||
@@ -262,6 +265,9 @@ function loadQSOTable(rows) {
|
||||
if ((user_options.name.show ?? 'true') == "true"){
|
||||
data.push(qso.name);
|
||||
}
|
||||
if ((user_options.qth.show ?? 'true') == "true"){
|
||||
data.push(qso.qth);
|
||||
}
|
||||
if ((user_options.qslvia.show ?? 'true') == "true"){
|
||||
data.push(qso.qslVia);
|
||||
}
|
||||
@@ -1369,6 +1375,7 @@ function saveOptions() {
|
||||
cqzone_layer: $('input[name="cqzones"]').is(':checked') ? true : false,
|
||||
ituzone_layer: $('input[name="ituzones"]').is(':checked') ? true : false,
|
||||
nightshadow_layer: $('input[name="nightshadow"]').is(':checked') ? true : false,
|
||||
qth: $('input[name="qth"]').is(':checked') ? true : false,
|
||||
},
|
||||
success: function(data) {
|
||||
$('#saveButton').prop("disabled", false);
|
||||
|
||||
@@ -28,6 +28,7 @@ class QSO
|
||||
private string $satelliteMode;
|
||||
private string $satelliteName;
|
||||
private string $name;
|
||||
private string $qth;
|
||||
private string $email;
|
||||
private string $address;
|
||||
private string $deGridsquare;
|
||||
@@ -195,6 +196,7 @@ class QSO
|
||||
$this->satelliteName = $data['COL_SAT_NAME'] != '' ? (isset($data['orbit']) && $data['orbit'] != '' ? $data['COL_SAT_NAME']." (".$data['orbit'].") " : $data['COL_SAT_NAME']) : '';
|
||||
|
||||
$this->name = $data['COL_NAME'] ?? '';
|
||||
$this->qth = $data['COL_QTH'] ?? '';
|
||||
$this->email = $data['COL_EMAIL'] ?? '';
|
||||
$this->address = $data['COL_ADDRESS'] ?? '';
|
||||
|
||||
@@ -1247,7 +1249,8 @@ class QSO
|
||||
'region' => $this->region,
|
||||
'antennaelevation' => $this->antennaelevation == null ? null : $this->antennaelevation.'°',
|
||||
'antennaazimuth' => $this->antennaazimuth == null ? null : $this->antennaazimuth.'°',
|
||||
'county' => $this->county
|
||||
'county' => $this->county,
|
||||
'qth' => $this->qth
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user