mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 08:13:41 +00:00
[SimpleFLE] Saving QSO partially works
This commit is contained in:
parent
8ab156297f
commit
33fb946256
@ -119,7 +119,7 @@ var Bands = <?php echo json_encode($bands);?>;
|
||||
<button class="btn btn-primary js-reload-qso">Reload QSO list</button>
|
||||
</div>
|
||||
<div class="col-3 col-sm-3">
|
||||
<button class="btn btn-warning js-download-adif">Save in Cloudlog</button>
|
||||
<button class="btn btn-warning js-save-to-log">Save in Cloudlog</button>
|
||||
</div>
|
||||
<div class="col-3 col-sm-3">
|
||||
<button class="btn btn-danger js-empty-qso">Clear logging session</button>
|
||||
|
@ -478,17 +478,6 @@ $(".js-download-adif").click(function () {
|
||||
download(filename, adif);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function isBandModeEntered() {
|
||||
let isBandModeOK = true;
|
||||
qsoList.forEach((item) => {
|
||||
@ -607,3 +596,46 @@ $(document).ready(function () {
|
||||
handleInput();
|
||||
}
|
||||
});
|
||||
|
||||
$(".js-save-to-log").click(function () {
|
||||
if (false === isBandModeEntered()) {
|
||||
alert("Some QSO do not have band and/or mode defined!");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var operator = $("#operator").val();
|
||||
operator = operator.toUpperCase();
|
||||
var ownCallsign = $("#station-call").val().toUpperCase();
|
||||
ownCallsign = ownCallsign.toUpperCase();
|
||||
var mySotaWwff = $("#my-sota-wwff").val().toUpperCase();
|
||||
|
||||
var myPower = $("#my-power").val();
|
||||
var myGrid = $("#my-grid").val().toUpperCase();
|
||||
|
||||
qsoList.forEach((item) => {
|
||||
var callsign = item[2];
|
||||
var rst_rcvd = item[7];
|
||||
var rst_sent = item[6];
|
||||
var start_date = (item[0].replace("-", "").replace("-", "")) + " " + (item[1].replace(":", ""));
|
||||
var band = item[4];
|
||||
var mode = item[5];
|
||||
var freq_display = item[3];
|
||||
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qso/saveqso',
|
||||
type: 'post',
|
||||
data: { callsign: callsign,
|
||||
rst_rcvd: rst_rcvd,
|
||||
rst_sent: rst_sent,
|
||||
start_date: start_date,
|
||||
band: band,
|
||||
mode: mode,
|
||||
freq_display: freq_display,
|
||||
},
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user