Add QSO count and Locator to details table
这个提交包含在:
父节点
92ba091872
当前提交
3b01617768
共有 3 个文件被更改,包括 10 次插入 和 5 次删除
|
|
@ -82,7 +82,7 @@ class Gridsquares_model extends CI_Model {
|
|||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_BAND = "'.$band.'"
|
||||
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE, COL_GRIDSQUARE FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_BAND = "'.$band.'"
|
||||
AND COL_PROP_MODE != "SAT"
|
||||
AND COL_PROP_MODE != "INTERNET"
|
||||
AND COL_PROP_MODE != "ECH"
|
||||
|
|
@ -99,7 +99,7 @@ class Gridsquares_model extends CI_Model {
|
|||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE, COL_SAT_NAME FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_PROP_MODE = "SAT"');
|
||||
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE, COL_SAT_NAME, COL_GRIDSQUARE FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_PROP_MODE = "SAT"');
|
||||
|
||||
//print_r($result);
|
||||
return json_encode($result->result());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">QSOs in Square: <span id="square_number"></span></h5>
|
||||
<h5 class="modal-title" id="exampleModalLabel"><span id="qso_count"></span> QSOs in Square: <span id="square_number"></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
<th scope="col">Callsign</th>
|
||||
<th scope="col">Mode</th>
|
||||
<th scope="col">Band</th>
|
||||
<th scope="col">Locator</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -906,6 +906,7 @@ $(document).ready(function(){
|
|||
var lng = LatLng.lng;
|
||||
var locator = LatLng2Loc(lat,lng, 10);
|
||||
var loc_4char = locator.substring(0, 4);
|
||||
var count = 0;
|
||||
console.log(loc_4char);
|
||||
console.log(map.getZoom());
|
||||
|
||||
|
|
@ -921,16 +922,19 @@ $(document).ready(function(){
|
|||
}
|
||||
|
||||
$.getJSON( "<?php echo site_url('gridsquares/');?>" + search_tags, function( data ) {
|
||||
count = Object.keys(data).length;
|
||||
console.log("Count: " + count);
|
||||
var items = [];
|
||||
$.each( data, function( i, item ) {
|
||||
console.log(item.COL_CALL + item.COL_SAT_NAME);
|
||||
if(item.COL_SAT_NAME != undefined) {
|
||||
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_SAT_NAME + "</td></tr>" );
|
||||
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_SAT_NAME + "</td><td>" + item.COL_GRIDSQUARE + "</td></tr>" );
|
||||
} else {
|
||||
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_BAND + "</td></tr>" );
|
||||
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_BAND + "</td><td>" + item.COL_GRIDSQUARE + "</td></tr>" );
|
||||
}
|
||||
});
|
||||
|
||||
$('#qso_count').text(count);
|
||||
$("#grid_results tbody").empty();
|
||||
$("#grid_results tbody").append(items.join( "" ));
|
||||
|
||||
|
|
|
|||
正在加载…
在新工单中引用