[Advanced Logbook] You can choose which columns to show
这个提交包含在:
父节点
708048d15f
当前提交
a78da90839
共有 6 个文件被更改,包括 389 次插入 和 66 次删除
|
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
|||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 139;
|
||||
$config['migration_version'] = 140;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class Logbookadvanced extends CI_Controller {
|
|||
$this->load->model('bands');
|
||||
$this->load->model('iota');
|
||||
$this->load->model('dxcc');
|
||||
$this->load->model('user_options_model');
|
||||
|
||||
$stationIds = [];
|
||||
|
||||
|
|
@ -40,6 +41,9 @@ class Logbookadvanced extends CI_Controller {
|
|||
$data['page_title'] = "Advanced logbook";
|
||||
$data['hasDatePicker'] = true;
|
||||
|
||||
$userOptions = $this->user_options_model->get_options('LogbookAdvanced')->result();
|
||||
$data['options'] = $userOptions[0]->option_value;
|
||||
|
||||
$pageData = [];
|
||||
$pageData['datePlaceholder'] = 'DD/MM/YYYY';
|
||||
$pageData['deOptions'] = $deOptions;
|
||||
|
|
@ -404,4 +408,38 @@ class Logbookadvanced extends CI_Controller {
|
|||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function userOptions() {
|
||||
$this->load->model('user_options_model');
|
||||
$userOptions = $this->user_options_model->get_options('LogbookAdvanced')->result();
|
||||
$data['options'] = $options = json_decode($userOptions[0]->option_value);
|
||||
$this->load->view('logbookadvanced/useroptions', $data);
|
||||
}
|
||||
|
||||
public function setUserOptions() {
|
||||
$json_string['datetime']['show'] = $this->input->post('datetime');
|
||||
$json_string['de']['show'] = $this->input->post('de');
|
||||
$json_string['dx']['show'] = $this->input->post('dx');
|
||||
$json_string['mode']['show'] = $this->input->post('mode');
|
||||
$json_string['rstr']['show'] = $this->input->post('rstr');
|
||||
$json_string['rsts']['show'] = $this->input->post('rsts');
|
||||
$json_string['band']['show'] = $this->input->post('band');
|
||||
$json_string['myrefs']['show'] = $this->input->post('myrefs');
|
||||
$json_string['refs']['show'] = $this->input->post('refs');
|
||||
$json_string['name']['show'] = $this->input->post('name');
|
||||
$json_string['qslvia']['show'] = $this->input->post('qslvia');
|
||||
$json_string['qsl']['show'] = $this->input->post('qsl');
|
||||
$json_string['lotw']['show'] = $this->input->post('lotw');
|
||||
$json_string['eqsl']['show'] = $this->input->post('eqsl');
|
||||
$json_string['qslmsg']['show'] = $this->input->post('qslmsg');
|
||||
$json_string['dxcc']['show'] = $this->input->post('dxcc');
|
||||
$json_string['state']['show'] = $this->input->post('state');
|
||||
$json_string['cqzone']['show'] = $this->input->post('cqzone');
|
||||
$json_string['iota']['show'] = $this->input->post('iota');
|
||||
|
||||
$obj['column_settings']= json_encode($json_string);
|
||||
|
||||
$this->load->model('user_options_model');
|
||||
$this->user_options_model->set_option('LogbookAdvanced', 'LogbookAdvanced', $obj);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_alter_user_options_table extends CI_Migration {
|
||||
|
||||
public function up() {
|
||||
$this->db->query("ALTER TABLE user_options CHANGE COLUMN option_value option_value text DEFAULT NULL;");
|
||||
}
|
||||
|
||||
public function down(){
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
*
|
||||
*/
|
||||
var custom_date_format = "<?php echo $custom_date_format ?>";
|
||||
<?php echo "var user_options = $options;"; ?>
|
||||
</script>
|
||||
<style>
|
||||
/*Legend specific*/
|
||||
|
|
@ -33,7 +34,9 @@ var custom_date_format = "<?php echo $custom_date_format ?>";
|
|||
margin: 0 8px 0 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
$options = json_decode($options);
|
||||
?>
|
||||
<div class="container-fluid qso_manager pt-3 pl-4 pr-4">
|
||||
<?php if ($this->session->flashdata('message')) { ?>
|
||||
<!-- Display Message -->
|
||||
|
|
@ -347,43 +350,76 @@ var custom_date_format = "<?php echo $custom_date_format ?>";
|
|||
<option value="5000">5000</option>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-sm btn-primary mr-1" id="searchButton">Search</button>
|
||||
<button type="button" class="btn btn-sm btn-primary mr-1" id="mapButton"
|
||||
onclick="mapQsos(this.form);">Map</button>
|
||||
<button type="reset" class="btn btn-sm btn-danger mr-1" id="resetButton">Reset</button>
|
||||
<button type="button" class="btn btn-sm btn-primary mr-1" id="mapButton" onclick="mapQsos(this.form);">Map</button>
|
||||
<button type="options" class="btn btn-sm btn-primary mr-1" id="optionButton">Options</button>
|
||||
<button type="reset" class="btn btn-sm btn-danger mr-1" id="resetButton">Reset</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center"
|
||||
id="qsoList">
|
||||
<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center" id="qsoList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<div class="form-check" style="margin-top: -1.5em"><input class="form-check-input" type="checkbox"
|
||||
id="checkBoxAll" /></div>
|
||||
<div class="form-check" style="margin-top: -1.5em"><input class="form-check-input" type="checkbox" id="checkBoxAll" /></div>
|
||||
</th>
|
||||
<th>Date/Time</th>
|
||||
<th>De</th>
|
||||
<th>Dx</th>
|
||||
<th>Mode</th>
|
||||
<th>RST (S)</th>
|
||||
<th>RST (R)</th>
|
||||
<th>Band</th>
|
||||
<th>My Refs</th>
|
||||
<th>Refs</th>
|
||||
<th>Name</th>
|
||||
<th>QSL Via</th>
|
||||
<th>QSL</th>
|
||||
<?php if ($this->session->userdata('user_eqsl_name') != ""){
|
||||
<?php if (($options->datetime->show ?? "true") == "true") {
|
||||
echo '<th>Date/Time</th>';
|
||||
} ?>
|
||||
<?php if (($options->de->show ?? "true") == "true") {
|
||||
echo '<th>De</th>';
|
||||
} ?>
|
||||
<?php if (($options->dx->show ?? "true") == "true") {
|
||||
echo '<th>Dx</th>';
|
||||
} ?>
|
||||
<?php if (($options->mode->show ?? "true") == "true") {
|
||||
echo '<th>Mode</th>';
|
||||
} ?>
|
||||
<?php if (($options->rsts->show ?? "true") == "true") {
|
||||
echo '<th>RST (S)</th>';
|
||||
} ?>
|
||||
<?php if (($options->rstr->show ?? "true") == "true") {
|
||||
echo '<th>RST (R)</th>';
|
||||
} ?>
|
||||
<?php if (($options->band->show ?? "true") == "true") {
|
||||
echo '<th>Band</th>';
|
||||
} ?>
|
||||
<?php if (($options->myrefs->show ?? "true") == "true") {
|
||||
echo '<th>My Refs</th>';
|
||||
} ?>
|
||||
<?php if (($options->refs->show ?? "true") == "true") {
|
||||
echo '<th>Refs</th>';
|
||||
} ?>
|
||||
<?php if (($options->name->show ?? "true") == "true") {
|
||||
echo '<th>Name</th>';
|
||||
} ?>
|
||||
<?php if (($options->qslvia->show ?? "true") == "true") {
|
||||
echo '<th>QSL Via</th>';
|
||||
} ?>
|
||||
<?php if (($options->qsl->show ?? "true") == "true") {
|
||||
echo '<th>QSL</th>';
|
||||
} ?>
|
||||
<?php if ($this->session->userdata('user_eqsl_name') != "" && ($options->eqsl->show ?? "true") == "true"){
|
||||
echo '<th class="eqslconfirmation">eQSL</th>';
|
||||
} ?>
|
||||
<?php if ($this->session->userdata('user_lotw_name') != ""){
|
||||
<?php if ($this->session->userdata('user_lotw_name') != "" && ($options->lotw->show ?? "true") == "true"){
|
||||
echo '<th class="lotwconfirmation">LoTW</th>';
|
||||
} ?>
|
||||
<th>QSL Msg</th>
|
||||
<th>DXCC</th>
|
||||
<th>State</th>
|
||||
<th>CQ Zone</th>
|
||||
<th>IOTA</th>
|
||||
<?php if (($options->qslmsg->show ?? "true") == "true") {
|
||||
echo '<th>QSL Msg</th>';
|
||||
} ?>
|
||||
<?php if (($options->dxcc->show ?? "true") == "true") {
|
||||
echo '<th>DXCC</th>';
|
||||
} ?>
|
||||
<?php if (($options->state->show ?? "true") == "true") {
|
||||
echo '<th>State</th>';
|
||||
} ?>
|
||||
<?php if (($options->cqzone->show ?? "true") == "true") {
|
||||
echo '<th>CQ Zone</th>';
|
||||
} ?>
|
||||
<?php if (($options->iota->show ?? "true") == "true") {
|
||||
echo '<th>IOTA</th>';
|
||||
} ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
<table style="width:100%" class="table-sm table table-hover table-striped table-condensed text-left" id="useroptions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">Column</th>
|
||||
<th>Show</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Date/Time</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="datetime" type="checkbox" <?php if (($options->datetime->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>De</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="de" type="checkbox" <?php if (($options->de->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dx</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="dx" type="checkbox" <?php if (($options->dx->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mode</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="mode" type="checkbox" <?php if (($options->mode->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RST (S)</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="rsts" type="checkbox" <?php if (($options->rsts->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RST (R)</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="rstr" type="checkbox" <?php if (($options->rstr->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Band</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="band" type="checkbox" <?php if (($options->band->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>My Refs</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="myrefs" type="checkbox" <?php if (($options->myrefs->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Refs</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="refs" type="checkbox" <?php if (($options->refs->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QSL</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="qsl" type="checkbox" <?php if (($options->qsl->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LoTW</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="lotw" type="checkbox" <?php if (($options->lotw->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>eQSL</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="eqsl" type="checkbox" <?php if (($options->eqsl->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QSL Msg</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="qslmsg" type="checkbox" <?php if (($options->qslmsg->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DXCC</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="dxcc" type="checkbox" <?php if (($options->dxcc->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>State</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="state" type="checkbox" <?php if (($options->state->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CQ Zone</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="cqzone" type="checkbox" <?php if (($options->cqzone->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IOTA</td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="iota" type="checkbox" <?php if (($options->iota->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -24,29 +24,63 @@ function updateRow(qso) {
|
|||
let row = $('#qsoID-' + qso.qsoID);
|
||||
let cells = row.find('td');
|
||||
let c = 1;
|
||||
cells.eq(c++).text(qso.qsoDateTime);
|
||||
cells.eq(c++).text(qso.de);
|
||||
cells.eq(c++).html('<span class="qso_call"><a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a><span class="qso_icons">' + (qso.callsign == '' ? '' : ' <a href="https://lotw.arrl.org/lotwuser/act?act='+qso.callsign+'" target="_blank"><small id="lotw_info" class="badge badge-success'+qso.lotw_hint+'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was ' + qso.lastupload + '">L</small></a>') + ' <a target="_blank" href="https://www.qrz.com/db/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/qrz.png" alt="Lookup ' + qso.dx + ' on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a></span></span>');
|
||||
cells.eq(c++).text(qso.mode);
|
||||
cells.eq(c++).text(qso.rstS);
|
||||
cells.eq(c++).text(qso.rstR);
|
||||
cells.eq(c++).text(qso.band);
|
||||
cells.eq(c++).text(qso.deRefs);
|
||||
cells.eq(c++).html(qso.dxRefs);
|
||||
cells.eq(c++).text(qso.name);
|
||||
cells.eq(c++).text(qso.qslVia);
|
||||
cells.eq(c++).html(qso.qsl);
|
||||
if ($(".eqslconfirmation")[0]){
|
||||
if (user_options.datetime.show == "true"){
|
||||
cells.eq(c++).text(qso.qsoDateTime);
|
||||
}
|
||||
if (user_options.de.show == "true"){
|
||||
cells.eq(c++).text(qso.de);
|
||||
}
|
||||
if (user_options.dx.show == "true"){
|
||||
cells.eq(c++).html('<span class="qso_call"><a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a><span class="qso_icons">' + (qso.callsign == '' ? '' : ' <a href="https://lotw.arrl.org/lotwuser/act?act='+qso.callsign+'" target="_blank"><small id="lotw_info" class="badge badge-success'+qso.lotw_hint+'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was ' + qso.lastupload + '">L</small></a>') + ' <a target="_blank" href="https://www.qrz.com/db/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/qrz.png" alt="Lookup ' + qso.dx + ' on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a></span></span>');
|
||||
}
|
||||
if (user_options.mode.show == "true"){
|
||||
cells.eq(c++).text(qso.mode);
|
||||
}
|
||||
if (user_options.rsts.show == "true"){
|
||||
cells.eq(c++).text(qso.rstS);
|
||||
}
|
||||
if (user_options.rstr.show == "true"){
|
||||
cells.eq(c++).text(qso.rstR);
|
||||
}
|
||||
if (user_options.band.show == "true"){
|
||||
cells.eq(c++).text(qso.band);
|
||||
}
|
||||
if (user_options.myrefs.show == "true"){
|
||||
cells.eq(c++).text(qso.deRefs);
|
||||
}
|
||||
if (user_options.refs.show == "true"){
|
||||
cells.eq(c++).html(qso.dxRefs);
|
||||
}
|
||||
if (user_options.name.show == "true"){
|
||||
cells.eq(c++).text(qso.name);
|
||||
}
|
||||
if (user_options.qslvia.show == "true"){
|
||||
cells.eq(c++).text(qso.qslVia);
|
||||
}
|
||||
if (user_options.qsl.show == "true"){
|
||||
cells.eq(c++).html(qso.qsl);
|
||||
}
|
||||
if ($(".eqslconfirmation")[0] && user_options.eqsl.show == "true"){
|
||||
cells.eq(c++).html(qso.eqsl);
|
||||
}
|
||||
if ($(".lotwconfirmation")[0]){
|
||||
if ($(".lotwconfirmation")[0] && user_options.lotw.show == "true"){
|
||||
cells.eq(c++).html(qso.lotw);
|
||||
}
|
||||
cells.eq(c++).text(qso.qslMessage);
|
||||
cells.eq(c++).html(qso.dxcc);
|
||||
cells.eq(c++).text(qso.state);
|
||||
cells.eq(c++).html(qso.cqzone);
|
||||
cells.eq(c++).html(qso.iota);
|
||||
if (user_options.qslmsg.show == "true"){
|
||||
cells.eq(c++).text(qso.qslMessage);
|
||||
}
|
||||
if (user_options.dxcc.show == "true"){
|
||||
cells.eq(c++).html(qso.dxcc);
|
||||
}
|
||||
if (user_options.state.show == "true"){
|
||||
cells.eq(c++).text(qso.state);
|
||||
}
|
||||
if (user_options.cqzone.show == "true"){
|
||||
cells.eq(c++).html(qso.cqzone);
|
||||
}
|
||||
if (user_options.iota.show == "true"){
|
||||
cells.eq(c++).html(qso.iota);
|
||||
}
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
return row;
|
||||
|
|
@ -67,6 +101,10 @@ function loadQSOTable(rows) {
|
|||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
// colReorder: {
|
||||
// order: [0, 2,1,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18]
|
||||
// // order: [0, customsortorder]
|
||||
// },
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -79,29 +117,63 @@ function loadQSOTable(rows) {
|
|||
|
||||
var data = [];
|
||||
data.push('<div class="form-check"><input class="form-check-input" type="checkbox" /></div>');
|
||||
data.push(qso.qsoDateTime);
|
||||
data.push(qso.de);
|
||||
data.push('<span class="qso_call"><a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a><span class="qso_icons">' + (qso.callsign == '' ? '' : ' <a href="https://lotw.arrl.org/lotwuser/act?act='+qso.callsign+'" target="_blank"><small id="lotw_info" class="badge badge-success'+qso.lotw_hint+'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was ' + qso.lastupload + ' ">L</small></a>') + ' <a target="_blank" href="https://www.qrz.com/db/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/qrz.png" alt="Lookup ' + qso.dx + ' on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a></span></span>');
|
||||
data.push(qso.mode);
|
||||
data.push(qso.rstS);
|
||||
data.push(qso.rstR);
|
||||
data.push(qso.band);
|
||||
data.push(qso.deRefs);
|
||||
data.push(qso.dxRefs);
|
||||
data.push(qso.name);
|
||||
data.push(qso.qslVia);
|
||||
data.push(qso.qsl);
|
||||
if ($(".eqslconfirmation")[0]){
|
||||
if (user_options.datetime.show == "true"){
|
||||
data.push(qso.qsoDateTime);
|
||||
}
|
||||
if (user_options.de.show == "true"){
|
||||
data.push(qso.de);
|
||||
}
|
||||
if (user_options.dx.show == "true"){
|
||||
data.push('<span class="qso_call"><a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a><span class="qso_icons">' + (qso.callsign == '' ? '' : ' <a href="https://lotw.arrl.org/lotwuser/act?act='+qso.callsign+'" target="_blank"><small id="lotw_info" class="badge badge-success'+qso.lotw_hint+'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was ' + qso.lastupload + ' ">L</small></a>') + ' <a target="_blank" href="https://www.qrz.com/db/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/qrz.png" alt="Lookup ' + qso.dx + ' on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a></span></span>');
|
||||
}
|
||||
if (user_options.mode.show == "true"){
|
||||
data.push(qso.mode);
|
||||
}
|
||||
if (user_options.rsts.show == "true"){
|
||||
data.push(qso.rstS);
|
||||
}
|
||||
if (user_options.rstr.show == "true"){
|
||||
data.push(qso.rstR);
|
||||
}
|
||||
if (user_options.band.show == "true"){
|
||||
data.push(qso.band);
|
||||
}
|
||||
if (user_options.myrefs.show == "true"){
|
||||
data.push(qso.deRefs);
|
||||
}
|
||||
if (user_options.refs.show == "true"){
|
||||
data.push(qso.dxRefs);
|
||||
}
|
||||
if (user_options.name.show == "true"){
|
||||
data.push(qso.name);
|
||||
}
|
||||
if (user_options.qslvia.show == "true"){
|
||||
data.push(qso.qslVia);
|
||||
}
|
||||
if (user_options.qsl.show == "true"){
|
||||
data.push(qso.qsl);
|
||||
}
|
||||
if ($(".eqslconfirmation")[0] && user_options.eqsl.show == "true"){
|
||||
data.push(qso.eqsl);
|
||||
}
|
||||
if ($(".lotwconfirmation")[0]){
|
||||
if ($(".lotwconfirmation")[0] && user_options.lotw.show == "true"){
|
||||
data.push(qso.lotw);
|
||||
}
|
||||
data.push(qso.qslMessage);
|
||||
data.push(qso.dxcc+(qso.end == null ? '' : ' <span class="badge badge-danger">Deleted DXCC</span>'));
|
||||
data.push(qso.state);
|
||||
data.push(qso.cqzone);
|
||||
data.push(qso.iota);
|
||||
if (user_options.qslmsg.show == "true"){
|
||||
data.push(qso.qslMessage);
|
||||
}
|
||||
if (user_options.dxcc.show == "true"){
|
||||
data.push(qso.dxcc+(qso.end == null ? '' : ' <span class="badge badge-danger">Deleted DXCC</span>'));
|
||||
}
|
||||
if (user_options.state.show == "true"){
|
||||
data.push(qso.state);
|
||||
}
|
||||
if (user_options.cqzone.show == "true"){
|
||||
data.push(qso.cqzone);
|
||||
}
|
||||
if (user_options.iota.show == "true"){
|
||||
data.push(qso.iota);
|
||||
}
|
||||
|
||||
let createdRow = table.row.add(data).index();
|
||||
table.rows(createdRow).nodes().to$().data('qsoID', qso.qsoID);
|
||||
|
|
@ -423,6 +495,47 @@ $(document).ready(function () {
|
|||
quickSearch('pota');
|
||||
});
|
||||
|
||||
$('#optionButton').click(function (event) {
|
||||
$('#optionButton').prop("disabled", true);
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/logbookadvanced/userOptions',
|
||||
type: 'post',
|
||||
success: function (html) {
|
||||
BootstrapDialog.show({
|
||||
title: 'Options for the Advanced Logbook',
|
||||
size: BootstrapDialog.SIZE_NORMAL,
|
||||
cssClass: 'options',
|
||||
nl2br: false,
|
||||
message: html,
|
||||
onshown: function(dialog) {
|
||||
},
|
||||
buttons: [{
|
||||
label: 'Save',
|
||||
cssClass: 'btn-primary btn-sm',
|
||||
id: 'saveButton',
|
||||
action: function (dialogItself) {
|
||||
$('#optionButton').prop("disabled", false);
|
||||
$('#closeButton').prop("disabled", true);
|
||||
saveOptions();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Close',
|
||||
cssClass: 'btn-sm',
|
||||
id: 'closeButton',
|
||||
action: function (dialogItself) {
|
||||
$('#optionButton').prop("disabled", false);
|
||||
dialogItself.close();
|
||||
}
|
||||
}],
|
||||
onhide: function(dialogRef){
|
||||
$('#optionButton').prop("disabled", false);
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#qslSlideshow').click(function (event) {
|
||||
var elements = $('#qsoList tbody input:checked');
|
||||
var nElements = elements.length;
|
||||
|
|
@ -920,3 +1033,40 @@ function loadMap(data) {
|
|||
}
|
||||
return (table += '</tbody></table>');
|
||||
}
|
||||
|
||||
function saveOptions() {
|
||||
$('#saveButton').prop("disabled", true);
|
||||
$('#closeButton').prop("disabled", true);
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/logbookadvanced/setUserOptions',
|
||||
type: 'post',
|
||||
data: {
|
||||
datetime: $('input[name="datetime"]').is(':checked') ? true : false,
|
||||
de: $('input[name="de"]').is(':checked') ? true : false,
|
||||
dx: $('input[name="dx"]').is(':checked') ? true : false,
|
||||
mode: $('input[name="mode"]').is(':checked') ? true : false,
|
||||
rsts: $('input[name="rsts"]').is(':checked') ? true : false,
|
||||
rstr: $('input[name="rstr"]').is(':checked') ? true : false,
|
||||
band: $('input[name="band"]').is(':checked') ? true : false,
|
||||
myrefs: $('input[name="myrefs"]').is(':checked') ? true : false,
|
||||
refs: $('input[name="refs"]').is(':checked') ? true : false,
|
||||
name: $('input[name="name"]').is(':checked') ? true : false,
|
||||
qslvia: $('input[name="qslvia"]').is(':checked') ? true : false,
|
||||
qsl: $('input[name="qsl"]').is(':checked') ? true : false,
|
||||
lotw: $('input[name="lotw"]').is(':checked') ? true : false,
|
||||
eqsl: $('input[name="eqsl"]').is(':checked') ? true : false,
|
||||
qslmsg: $('input[name="qslmsg"]').is(':checked') ? true : false,
|
||||
dxcc: $('input[name="dxcc"]').is(':checked') ? true : false,
|
||||
state: $('input[name="state"]').is(':checked') ? true : false,
|
||||
cqzone: $('input[name="cqzone"]').is(':checked') ? true : false,
|
||||
iota: $('input[name="iota"]').is(':checked') ? true : false,
|
||||
},
|
||||
success: function(data) {
|
||||
$('#saveButton').prop("disabled", false);
|
||||
$('#closeButton').prop("disabled", false);
|
||||
},
|
||||
error: function() {
|
||||
$('#saveButton').prop("disabled", false);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
正在加载…
在新工单中引用