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')),
|
'state' => xss_clean($this->input->post('state')),
|
||||||
'qsoresults' => xss_clean($this->input->post('qsoresults')),
|
'qsoresults' => xss_clean($this->input->post('qsoresults')),
|
||||||
'sats' => xss_clean($this->input->post('sats')),
|
'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 = [];
|
$qsos = [];
|
||||||
|
|
|
@ -56,6 +56,24 @@ class Logbookadvanced_model extends CI_Model {
|
||||||
$binding[] = $searchCriteria['qslReceived'];
|
$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'] !== '') {
|
if ($searchCriteria['iota'] !== '') {
|
||||||
$conditions[] = "COL_IOTA = ?";
|
$conditions[] = "COL_IOTA = ?";
|
||||||
$binding[] = $searchCriteria['iota'];
|
$binding[] = $searchCriteria['iota'];
|
||||||
|
|
|
@ -144,6 +144,8 @@
|
||||||
<option value="TR">Tropospheric ducting</option>
|
<option value="TR">Tropospheric ducting</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||||
<label for="qslSent">QSL Sent</label>
|
<label for="qslSent">QSL Sent</label>
|
||||||
<select id="qslSent" name="qslSent" class="form-control form-control-sm">
|
<select id="qslSent" name="qslSent" class="form-control form-control-sm">
|
||||||
|
@ -166,7 +168,50 @@
|
||||||
<option value="V">Verified</option>
|
<option value="V">Verified</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ function validateLocator(locator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// This displays the dialog with the form and it's where the resulttable is displayed
|
// This displays the dialog with the form and it's where the resulttable is displayed
|
||||||
function spawnLookupModal() {
|
function spawnLookupModal(searchphrase, searchtype) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: base_url + 'index.php/lookup',
|
url: base_url + 'index.php/lookup',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
|
@ -372,6 +372,35 @@ function spawnLookupModal() {
|
||||||
onshown: function(dialog) {
|
onshown: function(dialog) {
|
||||||
$('#quicklookuptype').change(function(){
|
$('#quicklookuptype').change(function(){
|
||||||
var type = $('#quicklookuptype').val();
|
var type = $('#quicklookuptype').val();
|
||||||
|
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',
|
||||||
|
action: function (dialogItself) {
|
||||||
|
dialogItself.close();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeLookupType(type) {
|
||||||
if (type == "dxcc") {
|
if (type == "dxcc") {
|
||||||
$('#quicklookupdxcc').show();
|
$('#quicklookupdxcc').show();
|
||||||
$('#quicklookupiota').hide();
|
$('#quicklookupiota').hide();
|
||||||
|
@ -403,17 +432,6 @@ function spawnLookupModal() {
|
||||||
$('#quicklookupdxcc').hide();
|
$('#quicklookupdxcc').hide();
|
||||||
$('#quicklookuptext').hide();
|
$('#quicklookuptext').hide();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
buttons: [{
|
|
||||||
label: 'Close',
|
|
||||||
action: function (dialogItself) {
|
|
||||||
dialogItself.close();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function executes the call to the backend for fetching queryresult and displays the table in the dialog
|
// This function executes the call to the backend for fetching queryresult and displays the table in the dialog
|
||||||
|
|
|
@ -187,7 +187,11 @@ $(document).ready(function () {
|
||||||
gridsquare: this.gridsquare.value,
|
gridsquare: this.gridsquare.value,
|
||||||
state: this.state.value,
|
state: this.state.value,
|
||||||
qsoresults: this.qsoResults.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',
|
dataType: 'json',
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
|
Ładowanie…
Reference in New Issue