当前提交
2431d26206
共有 4 个文件被更改,包括 345 次插入 和 32 次删除
|
|
@ -442,6 +442,11 @@ class Awards extends CI_Controller {
|
|||
}
|
||||
|
||||
public function was() {
|
||||
$footerData = [];
|
||||
$footerData['scripts'] = [
|
||||
'assets/js/sections/wasmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wasmap.js"))
|
||||
];
|
||||
|
||||
$this->load->model('was');
|
||||
$this->load->model('modes');
|
||||
$this->load->model('bands');
|
||||
|
|
@ -491,7 +496,7 @@ class Awards extends CI_Controller {
|
|||
$data['page_title'] = "Awards - WAS (Worked All States)";
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('awards/was/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
$this->load->view('interface_assets/footer', $footerData);
|
||||
}
|
||||
|
||||
public function iota () {
|
||||
|
|
@ -874,28 +879,53 @@ class Awards extends CI_Controller {
|
|||
|
||||
This displays the WAS map and requires the $band_type and $mode_type
|
||||
*/
|
||||
public function was_map($band_type, $mode_type) {
|
||||
public function was_map() {
|
||||
$stateString = 'AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY';
|
||||
$wasArray = explode(',', $stateString);
|
||||
|
||||
$this->load->model('was');
|
||||
|
||||
$data['mode'] = $mode_type;
|
||||
$bands[] = $this->security->xss_clean($this->input->post('band'));
|
||||
|
||||
$bands[] = $band_type;
|
||||
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
|
||||
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
|
||||
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
|
||||
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
|
||||
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
|
||||
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
|
||||
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
|
||||
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
|
||||
|
||||
$postdata['qsl'] = 1;
|
||||
$postdata['lotw'] = 1;
|
||||
$postdata['eqsl'] = 0;
|
||||
$postdata['worked'] = 1;
|
||||
$postdata['confirmed'] = 1;
|
||||
$postdata['notworked'] = 1;
|
||||
$postdata['band'] = $band_type;
|
||||
$postdata['mode'] = $mode_type;
|
||||
$was_array = $this->was->get_was_array($bands, $postdata);
|
||||
|
||||
$data['was_array'] = $this->was->get_was_array($bands, $postdata);
|
||||
$states = array();
|
||||
|
||||
$data['page_title'] = "";
|
||||
foreach ($wasArray as $state) { // Generating array for use in the table
|
||||
$states[$state] = '-'; // Inits each state's count
|
||||
}
|
||||
|
||||
$this->load->view('awards/was/map', $data);
|
||||
|
||||
foreach ($was_array as $was => $value) {
|
||||
foreach ($value as $key) {
|
||||
if($key != "") {
|
||||
if (strpos($key, '>W<') !== false) {
|
||||
$states[$was] = 'W';
|
||||
break;
|
||||
}
|
||||
if (strpos($key, '>C<') !== false) {
|
||||
$states[$was] = 'C';
|
||||
break;
|
||||
}
|
||||
if (strpos($key, '-') !== false) {
|
||||
$states[$was] = '-';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($states);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,3 +1,55 @@
|
|||
<script>
|
||||
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#wasmap {
|
||||
height: calc(100vh - 500px) !important;
|
||||
max-height: 900px !important;
|
||||
}
|
||||
/*Legend specific*/
|
||||
.legend {
|
||||
padding: 6px 8px;
|
||||
font: 14px Arial, Helvetica, sans-serif;
|
||||
background: white;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
line-height: 24px;
|
||||
color: #555;
|
||||
}
|
||||
.legend h4 {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
margin: 2px 12px 8px;
|
||||
color: #555;
|
||||
}
|
||||
.legend span {
|
||||
position: relative;
|
||||
bottom: 3px;
|
||||
color: #555;
|
||||
}
|
||||
.legend i {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
float: left;
|
||||
margin: 0 8px 0 0;
|
||||
opacity: 0.7;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 6px 8px;
|
||||
font: 14px/16px Arial, Helvetica, sans-serif;
|
||||
background: white;
|
||||
background: rgba(255,255,255,0.8);
|
||||
box-shadow: 0 0 15px rgba(0,0,0,0.2);
|
||||
border-radius: 5px;
|
||||
color: #555;
|
||||
}
|
||||
.info h4 {
|
||||
margin: 0 0 5px;
|
||||
color: #555;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<!-- Award Info Box -->
|
||||
|
|
@ -103,6 +155,27 @@
|
|||
</fieldset>
|
||||
</form>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="table-tab" data-bs-toggle="tab" href="#table" role="tab" aria-controls="table" aria-selected="true">Table</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="map-tab" onclick="load_was_map();" data-bs-toggle="tab" href="#wasmaptab" role="tab" aria-controls="home" aria-selected="false">Map</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade" id="wasmaptab" role="tabpanel" aria-labelledby="home-tab">
|
||||
<br />
|
||||
|
||||
<div id="wasmap" class="map-leaflet" ></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="table" role="tabpanel" aria-labelledby="table-tab">
|
||||
|
||||
|
||||
<?php
|
||||
if ($was_array) {
|
||||
$i = 1;
|
||||
|
|
@ -162,3 +235,7 @@
|
|||
else {
|
||||
echo '<div class="alert alert-danger" role="alert">Nothing found!</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -55,18 +55,6 @@
|
|||
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "was") ) { ?>
|
||||
<script>
|
||||
function load_was_map() {
|
||||
BootstrapDialog.show({
|
||||
title: 'Worked All States Map ('+$('#band2').val()+' '+$('#mode').val()+')',
|
||||
cssClass: 'was-map-dialog',
|
||||
message: $('<div></div>').load(site_url + '/awards/was_map/' + $('#band2').val() + '/' + $('#mode').val())
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Version Dialog START -->
|
||||
|
||||
<?php
|
||||
|
|
@ -1270,7 +1258,7 @@ $(document).on('keypress',function(e) {
|
|||
qso_set_eqsl_qslmsg(stationProfile,false,'.qso_panel');
|
||||
});
|
||||
// [eQSL default msg] change value on clic //
|
||||
$('.qso_panel .qso_eqsl_qslmsg_update').off('click').on('click',function() {
|
||||
$('.qso_panel .qso_eqsl_qslmsg_update').off('click').on('click',function() {
|
||||
qso_set_eqsl_qslmsg($('.qso_panel #stationProfile').val(),true,'.qso_panel');
|
||||
$('#charsLeft').text(" ");
|
||||
});
|
||||
|
|
@ -3088,10 +3076,10 @@ function viewEqsl(picture, callsign) {
|
|||
if ($('.icon_selectBox_data[data-boxcontent="'+boxcontent+'"]').is(":hidden")) { $('.icon_selectBox_data[data-boxcontent="'+boxcontent+'"]').show(); } else { $('.icon_selectBox_data[data-boxcontent="'+boxcontent+'"]').hide(); }
|
||||
});
|
||||
$('.icon_selectBox_data').off('mouseleave').on('mouseleave', function(){ if ($(this).is(":visible")) { $(this).hide(); } });
|
||||
$('.icon_selectBox_data label').off('click').on('click', function(){
|
||||
$('.icon_selectBox_data label').off('click').on('click', function(){
|
||||
var boxcontent = $(this).closest('.icon_selectBox_data').attr('data-boxcontent');
|
||||
$('input[name="user_map_'+boxcontent+'_icon"]').attr('value',$(this).attr('data-value'));
|
||||
if ($(this).attr('data-value') != "0") {
|
||||
if ($(this).attr('data-value') != "0") {
|
||||
$('.user_icon_color[data-icon="'+boxcontent+'"]').show();
|
||||
$('.icon_selectBox[data-boxcontent="'+boxcontent+'"] .icon_overSelect').html($(this).html());
|
||||
} else {
|
||||
|
|
@ -3099,10 +3087,10 @@ function viewEqsl(picture, callsign) {
|
|||
$('.icon_selectBox[data-boxcontent="'+boxcontent+'"] .icon_overSelect').html($(this).html().substring(0,10)+'.');
|
||||
}
|
||||
$('.icon_selectBox_data[data-boxcontent="'+boxcontent+'"]').hide();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (isset($scripts) && is_array($scripts)){
|
||||
|
|
|
|||
218
assets/js/sections/wasmap.js
普通文件
218
assets/js/sections/wasmap.js
普通文件
文件差异因一行或多行过长而隐藏
正在加载…
在新工单中引用