kopia lustrzana https://github.com/magicbug/Cloudlog
[Advanced Logbook] Added eQSL/LoTW filter and DXCC/CQ/IOTA lookup
rodzic
10d7739ea2
commit
34c0a925f2
|
@ -106,6 +106,10 @@ class Logbookadvanced extends CI_Controller {
|
|||
'state' => xss_clean($this->input->post('state')),
|
||||
'qsoresults' => xss_clean($this->input->post('qsoresults')),
|
||||
'sats' => xss_clean($this->input->post('sats')),
|
||||
'lotwSent' => xss_clean($this->input->post('lotwSent')),
|
||||
'lotwReceived' => xss_clean($this->input->post('lotwReceived')),
|
||||
'eqslSent' => xss_clean($this->input->post('eqslSent')),
|
||||
'eqslReceived' => xss_clean($this->input->post('eqslReceived')),
|
||||
);
|
||||
|
||||
$qsos = [];
|
||||
|
|
|
@ -56,6 +56,24 @@ class Logbookadvanced_model extends CI_Model {
|
|||
$binding[] = $searchCriteria['qslReceived'];
|
||||
}
|
||||
|
||||
if ($searchCriteria['lotwSent'] !== '') {
|
||||
$conditions[] = "COL_LOTW_QSL_SENT = ?";
|
||||
$binding[] = $searchCriteria['lotwSent'];
|
||||
}
|
||||
if ($searchCriteria['lotwReceived'] !== '') {
|
||||
$conditions[] = "COL_LOTW_QSL_RCVD = ?";
|
||||
$binding[] = $searchCriteria['lotwReceived'];
|
||||
}
|
||||
|
||||
if ($searchCriteria['eqslSent'] !== '') {
|
||||
$conditions[] = "COL_EQSL_QSL_SENT = ?";
|
||||
$binding[] = $searchCriteria['eqslSent'];
|
||||
}
|
||||
if ($searchCriteria['eqslReceived'] !== '') {
|
||||
$conditions[] = "COL_EQSL_QSL_RCVD = ?";
|
||||
$binding[] = $searchCriteria['eqslReceived'];
|
||||
}
|
||||
|
||||
if ($searchCriteria['iota'] !== '') {
|
||||
$conditions[] = "COL_IOTA = ?";
|
||||
$binding[] = $searchCriteria['iota'];
|
||||
|
|
|
@ -144,7 +144,9 @@
|
|||
<option value="TR">Tropospheric ducting</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label for="qslSent">QSL Sent</label>
|
||||
<select id="qslSent" name="qslSent" class="form-control form-control-sm">
|
||||
<option value="">All</option>
|
||||
|
@ -166,7 +168,50 @@
|
|||
<option value="V">Verified</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label for="lotwSent">LoTW Sent</label>
|
||||
<select id="lotwSent" name="lotwSent" class="form-control form-control-sm">
|
||||
<option value="">All</option>
|
||||
<option value="Y">Yes</option>
|
||||
<option value="N">No</option>
|
||||
<option value="R">Requested</option>
|
||||
<option value="Q">Queued</option>
|
||||
<option value="I">Ignore/Invalid</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label for="lotwReceived">LoTW Received</label>
|
||||
<select id="lotwReceived" name="lotwReceived" class="form-control form-control-sm">
|
||||
<option value="">All</option>
|
||||
<option value="Y">Yes</option>
|
||||
<option value="N">No</option>
|
||||
<option value="R">Requested</option>
|
||||
<option value="I">Ignore/Invalid</option>
|
||||
<option value="V">Verified</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label for="eqslSent">eQSL Sent</label>
|
||||
<select id="eqslSent" name="eqslSent" class="form-control form-control-sm">
|
||||
<option value="">All</option>
|
||||
<option value="Y">Yes</option>
|
||||
<option value="N">No</option>
|
||||
<option value="R">Requested</option>
|
||||
<option value="Q">Queued</option>
|
||||
<option value="I">Ignore/Invalid</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label for="eqslReceived">eQSL Received</label>
|
||||
<select id="eqslReceived" name="eqslReceived" class="form-control form-control-sm">
|
||||
<option value="">All</option>
|
||||
<option value="Y">Yes</option>
|
||||
<option value="N">No</option>
|
||||
<option value="R">Requested</option>
|
||||
<option value="I">Ignore/Invalid</option>
|
||||
<option value="V">Verified</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ function validateLocator(locator) {
|
|||
}
|
||||
|
||||
// This displays the dialog with the form and it's where the resulttable is displayed
|
||||
function spawnLookupModal() {
|
||||
function spawnLookupModal(searchphrase, searchtype) {
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/lookup',
|
||||
type: 'post',
|
||||
|
@ -372,38 +372,22 @@ function spawnLookupModal() {
|
|||
onshown: function(dialog) {
|
||||
$('#quicklookuptype').change(function(){
|
||||
var type = $('#quicklookuptype').val();
|
||||
if (type == "dxcc") {
|
||||
$('#quicklookupdxcc').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "iota") {
|
||||
$('#quicklookupiota').show();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "vucc" || type == "sota" || type == "wwff") {
|
||||
$('#quicklookuptext').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
} else if (type == "cq") {
|
||||
$('#quicklookupcqz').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "was") {
|
||||
$('#quicklookupwas').show();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
}
|
||||
changeLookupType(type);
|
||||
});
|
||||
if (searchtype !== undefined) {
|
||||
$('#quicklookuptype').val(searchtype);
|
||||
if (searchtype == 'dxcc') {
|
||||
$("#quicklookupdxcc").val(searchphrase);
|
||||
} else if (searchtype == 'iota') {
|
||||
$("#quicklookupiota").val(searchphrase);
|
||||
} else if (searchtype == 'cq') {
|
||||
$("#quicklookupcqz").val(searchphrase);
|
||||
} else {
|
||||
$("#quicklookuptext").val(searchphrase);
|
||||
}
|
||||
changeLookupType(searchtype);
|
||||
getLookupResult(this.form);
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
label: 'Close',
|
||||
|
@ -416,6 +400,40 @@ function spawnLookupModal() {
|
|||
});
|
||||
}
|
||||
|
||||
function changeLookupType(type) {
|
||||
if (type == "dxcc") {
|
||||
$('#quicklookupdxcc').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "iota") {
|
||||
$('#quicklookupiota').show();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "vucc" || type == "sota" || type == "wwff") {
|
||||
$('#quicklookuptext').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
} else if (type == "cq") {
|
||||
$('#quicklookupcqz').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "was") {
|
||||
$('#quicklookupwas').show();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// This function executes the call to the backend for fetching queryresult and displays the table in the dialog
|
||||
function getLookupResult() {
|
||||
$(".ld-ext-right").addClass('running');
|
||||
|
|
|
@ -187,7 +187,11 @@ $(document).ready(function () {
|
|||
gridsquare: this.gridsquare.value,
|
||||
state: this.state.value,
|
||||
qsoresults: this.qsoResults.value,
|
||||
sats: this.sats.value
|
||||
sats: this.sats.value,
|
||||
lotwSent: this.lotwSent.value,
|
||||
lotwReceived: this.lotwReceived.value,
|
||||
eqslSent: this.eqslSent.value,
|
||||
eqslReceived: this.eqslReceived.value,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
|
|
Ładowanie…
Reference in New Issue