diff --git a/application/controllers/Bandmap.php b/application/controllers/Bandmap.php index 1719d891..f8c7e26b 100644 --- a/application/controllers/Bandmap.php +++ b/application/controllers/Bandmap.php @@ -11,6 +11,11 @@ class Bandmap extends CI_Controller { } function index() { + $this->load->model('cat'); + $this->load->model('bands'); + $data['radios'] = $this->cat->radios(); + $data['bands'] = $this->bands->get_user_bands_for_qso_entry(); + $footerData = []; $footerData['scripts'] = [ 'assets/js/sections/bandmap.js', diff --git a/application/views/bandmap/index.php b/application/views/bandmap/index.php index 8e5d6d3c..a933678c 100644 --- a/application/views/bandmap/index.php +++ b/application/views/bandmap/index.php @@ -1,31 +1,38 @@ -
diff --git a/assets/js/sections/bandmap.js b/assets/js/sections/bandmap.js index 520d9fc0..dfd89c07 100644 --- a/assets/js/sections/bandmap.js +++ b/assets/js/sections/bandmap.js @@ -147,7 +147,7 @@ $(function() { function set_chart(band,maxAgeMinutes) { let dxurl = dxcluster_provider + "/spots/" + band + "/" +maxAgeMinutes; $.ajax({ - url: dxurl, + url: dxurl, cache: false, dataType: "json" }).done(function(dxspots) { @@ -169,3 +169,62 @@ $(function() { set_chart($('#band option:selected').val(),30); }); }); + +var updateFromCAT = function() { + if($('select.radios option:selected').val() != '0') { + radioID = $('select.radios option:selected').val(); + $.getJSON( "radio/json/" + radioID, function( data ) { + + if (data.error) { + if (data.error == 'not_logged_in') { + $(".radio_cat_state" ).remove(); + if($('.radio_login_error').length == 0) { + $('.messages').prepend('