mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #1501 from phl0/addGridCountToMap
Add grid count to map
This commit is contained in:
@@ -25,13 +25,13 @@
|
||||
<div class="container">
|
||||
<?php if ($this->uri->segment(2) == "satellites") { ?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
Confirmed is Green | Activated but not confirmed is Red
|
||||
Confirmed is Green <span id="confirmed_grids"></span>| Activated but not confirmed is Red <span id="activated_grids"></span>| <span id="sum_grids"></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(2) == "band") { ?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
Confirmed is Green | Activated but not confirmed is Red <br>
|
||||
Confirmed is Green <span id="confirmed_grids"></span>| Activated 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 } ?>
|
||||
|
||||
@@ -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>
|
||||
</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 square'+(grid_four_confirmed_count != 1 ? 's' : '')+') ';
|
||||
}
|
||||
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 square'+(grid_four_count-grid_four_confirmed_count != 1 ? 's' : '')+') ';
|
||||
}
|
||||
var span = document.getElementById('sum_grids');
|
||||
span.innerText = span.textContent = ' Total Count: '+grid_four_count+' grid square'+(grid_four_count != 1 ? 's' : '');
|
||||
|
||||
var maidenhead = L.maidenhead().addTo(map);
|
||||
|
||||
map.on('click', onMapClick);
|
||||
@@ -1371,10 +1390,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 square'+(grid_four_confirmed_count != 1 ? 's' : '')+') ';
|
||||
}
|
||||
if ((grid_four_count-grid_four_confirmed_count) > 0) {
|
||||
var span = document.getElementById('activated_grids');
|
||||
span.innerText = span.textContent = '('+(grid_four_count-grid_four_confirmed_count)+' grid square'+(grid_four_count-grid_four_confirmed_count != 1 ? 's' : '')+') ';
|
||||
}
|
||||
var span = document.getElementById('sum_grids');
|
||||
span.innerText = span.textContent = ' Total Count: '+grid_four_count+' grid square'+(grid_four_count != 1 ? 's' : '');
|
||||
|
||||
var maidenhead = L.maidenhead().addTo(map);
|
||||
|
||||
map.on('click', onMapClick);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php echo $this->uri->segment(2); ?>
|
||||
|
||||
<!-- General JS Files used across Cloudlog -->
|
||||
<script src="<?php echo base_url(); ?>assets/js/jquery-3.3.1.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets/js/popper.min.js"></script>
|
||||
@@ -87,10 +85,30 @@
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user