[Advanced Logbook] Show/hide LoTW/eQSL according to username set

这个提交包含在:
Andreas 2023-05-02 19:04:12 +02:00
父节点 4975072693
当前提交 7b6a90634c
共有 2 个文件被更改,包括 38 次插入27 次删除

查看文件

@ -202,8 +202,12 @@
<th>Name</th> <th>Name</th>
<th>QSL Via</th> <th>QSL Via</th>
<th>QSL</th> <th>QSL</th>
<th>LoTW</th> <?php if ($this->session->userdata('user_lotw_name') != ""){
<th>eQSL</th> echo '<th class="lotwconfirmation">LoTW</th>';
} ?>
<?php if ($this->session->userdata('user_eqsl_name') != ""){
echo '<th class="eqslconfirmation">eQSL</th>';
} ?>
<th>QSL Msg</th> <th>QSL Msg</th>
<th>DXCC</th> <th>DXCC</th>
<th>State</th> <th>State</th>

查看文件

@ -27,8 +27,12 @@ function updateRow(qso) {
cells.eq(c++).text(qso.name); cells.eq(c++).text(qso.name);
cells.eq(c++).text(qso.qslVia); cells.eq(c++).text(qso.qslVia);
cells.eq(c++).html(qso.qsl); cells.eq(c++).html(qso.qsl);
cells.eq(c++).html(qso.lotw); if ($(".lotwconfirmation")[0]){
cells.eq(c++).html(qso.eqsl); cells.eq(c++).html(qso.lotw);
}
if ($(".eqslconfirmation")[0]){
cells.eq(c++).html(qso.eqsl);
}
cells.eq(c++).text(qso.qslMessage); cells.eq(c++).text(qso.qslMessage);
cells.eq(c++).text(qso.dxcc); cells.eq(c++).text(qso.dxcc);
cells.eq(c++).text(qso.state); cells.eq(c++).text(qso.state);
@ -63,29 +67,32 @@ function loadQSOTable(rows) {
for (i = 0; i < rows.length; i++) { for (i = 0; i < rows.length; i++) {
let qso = rows[i]; let qso = rows[i];
var data = [ var data = [];
'<div class="form-check"><input class="form-check-input" type="checkbox" /></div>', data.push('<div class="form-check"><input class="form-check-input" type="checkbox" /></div>');
qso.qsoDateTime, data.push(qso.qsoDateTime);
qso.de, data.push(qso.de);
'<a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a>', data.push('<a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a>');
qso.mode, data.push(qso.mode);
qso.rstS, data.push(qso.rstS);
qso.rstR, data.push(qso.rstR);
qso.band, data.push(qso.band);
qso.deRefs, data.push(qso.deRefs);
qso.dxRefs, data.push(qso.dxRefs);
qso.name, data.push(qso.name);
qso.qslVia, data.push(qso.qslVia);
qso.qsl, data.push(qso.qsl);
qso.lotw, if ($(".lotwconfirmation")[0]){
qso.eqsl, data.push(qso.lotw);
qso.qslMessage, }
qso.dxcc+(qso.end == null ? '' : ' <span class="badge badge-danger">Deleted DXCC</span>'), if ($(".eqslconfirmation")[0]){
qso.state, data.push(qso.eqsl);
qso.cqzone, }
qso.iota, 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);
let createdRow = table.row.add(data).index(); let createdRow = table.row.add(data).index();
table.rows(createdRow).nodes().to$().data('qsoID', qso.qsoID); table.rows(createdRow).nodes().to$().data('qsoID', qso.qsoID);