Remove some debug code and add visitor to gridmap.js
这个提交包含在:
父节点
aebf53e35b
当前提交
67b8bf40ec
共有 3 个文件被更改,包括 7 次插入 和 75 次删除
|
|
@ -149,7 +149,6 @@ function load_was_map() {
|
||||||
<script>
|
<script>
|
||||||
var position;
|
var position;
|
||||||
function getLocation() {
|
function getLocation() {
|
||||||
console.log("'clicked");
|
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
navigator.geolocation.getCurrentPosition(showPosition);
|
navigator.geolocation.getCurrentPosition(showPosition);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1588,8 +1587,6 @@ $(document).ready(function(){
|
||||||
var lng = LatLng.lng;
|
var lng = LatLng.lng;
|
||||||
var locator = LatLng2Loc(lat,lng, 10);
|
var locator = LatLng2Loc(lat,lng, 10);
|
||||||
var loc_4char = locator.substring(0, 4);
|
var loc_4char = locator.substring(0, 4);
|
||||||
console.log(loc_4char);
|
|
||||||
console.log(map.getZoom());
|
|
||||||
|
|
||||||
if(map.getZoom() > 2) {
|
if(map.getZoom() > 2) {
|
||||||
<?php if ($this->session->userdata('user_callsign')) { ?>
|
<?php if ($this->session->userdata('user_callsign')) { ?>
|
||||||
|
|
@ -1731,8 +1728,6 @@ $(document).ready(function(){
|
||||||
var lng = LatLng.lng;
|
var lng = LatLng.lng;
|
||||||
var locator = LatLng2Loc(lat,lng, 10);
|
var locator = LatLng2Loc(lat,lng, 10);
|
||||||
var loc_4char = locator.substring(0, 4);
|
var loc_4char = locator.substring(0, 4);
|
||||||
console.log(loc_4char);
|
|
||||||
console.log(map.getZoom());
|
|
||||||
|
|
||||||
if(map.getZoom() > 2) {
|
if(map.getZoom() > 2) {
|
||||||
<?php if ($this->session->userdata('user_callsign')) { ?>
|
<?php if ($this->session->userdata('user_callsign')) { ?>
|
||||||
|
|
|
||||||
|
|
@ -103,73 +103,8 @@
|
||||||
var grid_four_confirmed_count = grid_four_confirmed.length;
|
var grid_four_confirmed_count = grid_four_confirmed.length;
|
||||||
var grid_six_confirmed_count = grid_six_confirmed.length;
|
var grid_six_confirmed_count = grid_six_confirmed.length;
|
||||||
|
|
||||||
if (grid_four_confirmed_count > 0) {
|
|
||||||
var span = document.getElementById('confirmed_grids');
|
|
||||||
//span.innerText = span.textContent = '('+grid_four_confirmed_count+' grid squares) ';
|
|
||||||
}
|
|
||||||
if ((grid_four_count-grid_four_confirmed_count) > 0) {
|
|
||||||
var span = document.getElementById('worked_grids');
|
|
||||||
//span.innerText = span.textContent = '('+(grid_four_count-grid_four_confirmed_count)+' grid squares) ';
|
|
||||||
}
|
|
||||||
var span = document.getElementById('sum_grids');
|
|
||||||
//span.innerText = span.textContent = ' Total Count: '+grid_four_count+' grid squares';
|
|
||||||
|
|
||||||
var maidenhead = L.maidenhead().addTo(map);
|
var maidenhead = L.maidenhead().addTo(map);
|
||||||
|
|
||||||
map.on('click', onMapClick);
|
|
||||||
|
|
||||||
function onMapClick(event) {
|
|
||||||
var LatLng = event.latlng;
|
|
||||||
var lat = LatLng.lat;
|
|
||||||
var lng = LatLng.lng;
|
|
||||||
var locator = LatLng2Loc(lat,lng, 10);
|
|
||||||
var loc_4char = locator.substring(0, 4);
|
|
||||||
console.log(loc_4char);
|
|
||||||
console.log(map.getZoom());
|
|
||||||
|
|
||||||
if(map.getZoom() > 2) {
|
|
||||||
<?php if ($this->session->userdata('user_callsign')) { ?>
|
|
||||||
var band = '';
|
|
||||||
var search_type = "<?php echo $this->uri->segment(2); ?>";
|
|
||||||
if(search_type == "satellites") {
|
|
||||||
band = 'SAT';
|
|
||||||
} else {
|
|
||||||
band = "<?php echo $this->uri->segment(3); ?>";
|
|
||||||
}
|
|
||||||
$(".modal-body").empty();
|
|
||||||
$.ajax({
|
|
||||||
url: base_url + 'index.php/awards/qso_details_ajax',
|
|
||||||
type: 'post',
|
|
||||||
data: {
|
|
||||||
'Searchphrase': loc_4char,
|
|
||||||
'Band': band,
|
|
||||||
'Mode': 'All',
|
|
||||||
'Type': 'VUCC'
|
|
||||||
},
|
|
||||||
success: function (html) {
|
|
||||||
$(".modal-body").html(html);
|
|
||||||
$(".modal-body table").addClass('table-sm');
|
|
||||||
$(".modal-body h5").empty();
|
|
||||||
var count = $('.table tr').length;
|
|
||||||
count = count - 1;
|
|
||||||
$('#qso_count').text(count);
|
|
||||||
if (count > 1) {
|
|
||||||
$('#gt1_qso').text("s");
|
|
||||||
} else {
|
|
||||||
$('#gt1_qso').text("");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count > 0) {
|
|
||||||
$('#square_number').text(loc_4char);
|
|
||||||
$('#exampleModal').modal('show');
|
|
||||||
$('[data-bs-toggle="tooltip"]').tooltip({ boundary: 'window' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
<?php } ?>
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
<?php if ($this->uri->segment(1) == "gridsquares" && $this->uri->segment(2) == "band") { ?>
|
<?php if ($this->uri->segment(1) == "gridsquares" && $this->uri->segment(2) == "band") { ?>
|
||||||
|
|
||||||
var bands_available = <?php echo $bands_available; ?>;
|
var bands_available = <?php echo $bands_available; ?>;
|
||||||
|
|
|
||||||
|
|
@ -61,18 +61,18 @@ function gridPlot(form, visitor) {
|
||||||
grid_two_confirmed = data.grid_2char_confirmed;
|
grid_two_confirmed = data.grid_2char_confirmed;
|
||||||
grid_four_confirmed = data.grid_4char_confirmed;
|
grid_four_confirmed = data.grid_4char_confirmed;
|
||||||
grid_six_confirmed = data.grid_6char_confirmed;
|
grid_six_confirmed = data.grid_6char_confirmed;
|
||||||
plot(grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confirmed, grid_six_confirmed);
|
plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confirmed, grid_six_confirmed);
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
plot(grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confirmed, grid_six_confirmed);
|
plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confirmed, grid_six_confirmed);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function plot(grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confirmed, grid_six_confirmed) {
|
function plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confirmed, grid_six_confirmed) {
|
||||||
var layer = L.tileLayer(jslayer, {
|
var layer = L.tileLayer(jslayer, {
|
||||||
maxZoom: 12,
|
maxZoom: 12,
|
||||||
attribution: jsattribution,
|
attribution: jsattribution,
|
||||||
|
|
@ -113,8 +113,10 @@ function plot(grid_two, grid_four, grid_six, grid_two_confirmed, grid_four_confi
|
||||||
legend.addTo(map);
|
legend.addTo(map);
|
||||||
|
|
||||||
var maidenhead = L.maidenhead().addTo(map);
|
var maidenhead = L.maidenhead().addTo(map);
|
||||||
map.on('mousemove', onMapMove);
|
if (visitor != true) {
|
||||||
map.on('click', onMapClick);
|
map.on('mousemove', onMapMove);
|
||||||
|
map.on('click', onMapClick);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function spawnGridsquareModal(loc_4char) {
|
function spawnGridsquareModal(loc_4char) {
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用