diff --git a/assets/js/sections/bandmap_list.js b/assets/js/sections/bandmap_list.js
index b3ef7f639..4c60e12fa 100644
--- a/assets/js/sections/bandmap_list.js
+++ b/assets/js/sections/bandmap_list.js
@@ -35,7 +35,7 @@ $(function() {
return table;
}
- function fill_list(band,de,maxAgeMinutes) {
+ function fill_list(band,de,maxAgeMinutes,cwn) {
// var table = $('.spottable').DataTable();
var table = get_dtable();
if ((band != '') && (band !== undefined)) {
@@ -48,9 +48,14 @@ $(function() {
table.page.len(50);
let oldtable=table.data();
table.clear();
+ let spots2render=0;
if (dxspots.length>0) {
dxspots.sort(SortByQrg);
dxspots.forEach((single) => {
+ if ((cwn == 'wkd') && (!(single.worked_dxcc))) { return; }
+ if ((cwn == 'cnf') && (!(single.cnfmd_dxcc))) { return; }
+ if ((cwn == 'ucnf') && ((single.cnfmd_dxcc))) { return; }
+ spots2render++;
var data=[];
if (single.cnfmd_dxcc) {
dxcc_wked_info="text-success";
@@ -117,6 +122,10 @@ $(function() {
table.clear();
table.draw();
}
+ if (spots2render == 0) {
+ table.clear();
+ table.draw();
+ }
});
} else {
table.clear();
@@ -145,17 +154,22 @@ $(function() {
var table=get_dtable();
table.order([1, 'asc']);
table.clear();
- fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage);
- setInterval(function () { fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage); },60000);
+ fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage,$('#cwnSelect option:selected').val());
+ setInterval(function () { fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage,$('#cwnSelect option:selected').val()); },60000);
+
+ $("#cwnSelect").on("change",function() {
+ table.clear();
+ fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage,$('#cwnSelect option:selected').val());
+ });
$("#decontSelect").on("change",function() {
table.clear();
- fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage);
+ fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage,$('#cwnSelect option:selected').val());
});
$("#band").on("change",function() {
table.clear();
- fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage);
+ fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),dxcluster_maxage,$('#cwnSelect option:selected').val());
});
$("#spottertoggle").on("click", function() {
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js
index 8fbd37d6b..43268951d 100644
--- a/assets/js/sections/station_locations.js
+++ b/assets/js/sections/station_locations.js
@@ -12,6 +12,41 @@ $(document).ready(function () {
$("#dxcc_id").change(function () {
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
});
+
+ $('#qrz_apitest_btn').click(function(){
+
+ var apikey = $('#qrzApiKey').val();
+ var msg_div = $('#qrz_apitest_msg');
+
+ msg_div.hide();
+ msg_div.removeClass('alert-success alert-danger')
+
+ $.ajax({
+ url: base_url+'index.php/qrz/qrz_apitest',
+ type: 'POST',
+ data: {
+ 'APIKEY': apikey
+ },
+ success: function(res) {
+ if(res.status == 'OK') {
+ msg_div.addClass('alert-success');
+ msg_div.text('Your API Key works. You are good to go!');
+ msg_div.show();
+ } else {
+ msg_div.addClass('alert-danger');
+ msg_div.text('Your API Key failed. Are you sure you have a valid QRZ subsription?');
+ msg_div.show();
+ $('#qrzrealtime').val(-1);
+ }
+ },
+ error: function(res) {
+ msg_div.addClass('alert-danger');
+ msg_div.text('ERROR: Something went wrong on serverside. We\'re sorry..');
+ msg_div.show();
+ },
+ });
+ });
+
}
});