Add grind count to map view
这个提交包含在:
父节点
64c9eb4fbb
当前提交
0805c7ceb0
共有 2 个文件被更改,包括 21 次插入 和 2 次删除
|
|
@ -25,13 +25,13 @@
|
|||
<div class="container">
|
||||
<?php if ($this->uri->segment(2) == "satellites") { ?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
Confirmed is Green | Worked but not confirmed is Red
|
||||
Confirmed is Green <span id="confirmed_grids"></span> | Worked but not confirmed is Red <span id="worked_grids"></span> <span id="sum_grids"></span><br>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(2) == "band") { ?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
Confirmed is Green | Worked but not confirmed is Red <br>
|
||||
Confirmed is Green <span id="confirmed_grids"></span> | Worked but not confirmed is Red <span id="worked_grids"></span> <span id="sum_grids"></span><br>
|
||||
[This map does not include satellite, internet or repeater QSOs]
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
|
|||
|
|
@ -1256,10 +1256,29 @@ $(document).ready(function(){
|
|||
var grid_four = <?php echo $grid_4char; ?>;
|
||||
var grid_six = <?php echo $grid_6char; ?>;
|
||||
|
||||
var grid_two_count = grid_two.length;
|
||||
var grid_four_count = grid_four.length;
|
||||
var grid_six_count = grid_six.length;
|
||||
|
||||
var grid_two_confirmed = <?php echo $grid_2char_confirmed; ?>;
|
||||
var grid_four_confirmed = <?php echo $grid_4char_confirmed; ?>;
|
||||
var grid_six_confirmed = <?php echo $grid_6char_confirmed; ?>;
|
||||
|
||||
var grid_two_confirmed_count = grid_two_confirmed.length;
|
||||
var grid_four_confirmed_count = grid_four_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);
|
||||
|
||||
map.on('click', onMapClick);
|
||||
|
|
|
|||
正在加载…
在新工单中引用