diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 0e58533c..473ac838 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -324,6 +324,19 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } + public function cq_details_ajax(){ + $this->load->model('logbook_model'); + + $cqzone = str_replace('"', "", $this->input->post("CQZone")); + $band = str_replace('"', "", $this->input->post("Band")); + $data['results'] = $this->logbook_model->cq_qso_details($cqzone, $band); + + // Render Page + $data['page_title'] = "Log View - DXCC"; + $data['filter'] = "CQZone ".$cqzone. " and ".$band;; + $this->load->view('awards/cq/details_ajax', $data); + } + public function was() { $this->load->model('was'); $data['worked_bands'] = $this->was->get_worked_bands(); diff --git a/application/models/Cq.php b/application/models/Cq.php index 1485d8cb..e62ee86f 100644 --- a/application/models/Cq.php +++ b/application/models/Cq.php @@ -97,14 +97,14 @@ class CQ extends CI_Model{ if ($postdata['worked'] != NULL) { $cqBand = $this->getCQWorked($station_id, $band, $postdata); foreach ($cqBand as $line) { - $bandCq[$line->col_cqz][$band] = '
col_cqz) . '"&Band="' . $band . '"\'>W
'; + $bandCq[$line->col_cqz][$band] = '
col_cqz) . '","' . $band . '")\'>W
'; $cqZ[$line->col_cqz]['count']++; } } if ($postdata['confirmed'] != NULL) { $cqBand = $this->getCQConfirmed($station_id, $band, $postdata); foreach ($cqBand as $line) { - $bandCq[$line->col_cqz][$band] = '
col_cqz) . '"&Band="' . $band . '"\'>C
'; + $bandCq[$line->col_cqz][$band] = '
col_cqz) . '","' . $band . '")\'>C
'; $cqZ[$line->col_cqz]['count']++; } } diff --git a/application/views/awards/cq/details_ajax.php b/application/views/awards/cq/details_ajax.php new file mode 100644 index 00000000..97a47ed4 --- /dev/null +++ b/application/views/awards/cq/details_ajax.php @@ -0,0 +1,3 @@ +

Filtering on

+ +load->view('view_log/partial/log_ajax') ?> diff --git a/application/views/awards/cq/index.php b/application/views/awards/cq/index.php index 65677eb7..55f287b2 100644 --- a/application/views/awards/cq/index.php +++ b/application/views/awards/cq/index.php @@ -11,12 +11,12 @@ Table
-
+

diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index fe8a90f0..e43ff990 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1440,7 +1440,6 @@ $(document).ready(function(){ id: 'mapbox.streets' }).addTo(mymap); - var redIcon = L.icon({ iconUrl: icon_dot_url, iconSize: [18, 18], // size of the icon @@ -1486,6 +1485,37 @@ $(document).ready(function(){ } + + uri->segment(2) == "cq") { ?> + + function displayCqContacts(cqzone, band) { + var baseURL= ""; + $.ajax({ + url: baseURL + 'index.php/awards/cq_details_ajax', + type: 'post', + data: {'CQZone': cqzone, + 'Band': band + }, + success: function(html) { + BootstrapDialog.show({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-cq-dialog', + nl2br: false, + message: html, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); + } + + + uri->segment(2) == "was") { ?> function displayWasContacts(was, band) { var baseURL= ""; @@ -1513,6 +1543,7 @@ $(document).ready(function(){ }); } + function qsl_rcvd(id, method) { var baseURL= ""; $.ajax({