Added de-spot options as selector
这个提交包含在:
父节点
32073482b6
当前提交
ba9d5be562
共有 3 个文件被更改,包括 24 次插入 和 7 次删除
|
|
@ -56,8 +56,8 @@ class Dxcluster_model extends CI_Model {
|
||||||
$dxcc=$dxccObj->dxcc_lookup($singlespot->spotter,date('Ymd', time()));
|
$dxcc=$dxccObj->dxcc_lookup($singlespot->spotter,date('Ymd', time()));
|
||||||
$singlespot->dxcc_spotter=$dxcc;
|
$singlespot->dxcc_spotter=$dxcc;
|
||||||
}
|
}
|
||||||
if ( ($de != '') && (property_exists($singlespot->dxcc_spotter,'cont')) ){ // If we have a "de continent" and a filter-wish filter on that
|
if ( ($de != '') && ($de != 'Any') && (property_exists($singlespot->dxcc_spotter,'cont')) ){ // If we have a "de continent" and a filter-wish filter on that
|
||||||
if ($de == $singlespot->dxcc_spotter->cont) {
|
if (strtolower($de) == strtolower($singlespot->dxcc_spotter->cont)) {
|
||||||
$singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) == 1);
|
$singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) == 1);
|
||||||
array_push($spotsout,$singlespot);
|
array_push($spotsout,$singlespot);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,17 @@
|
||||||
<option value="<?php echo $row->id; ?>" <?php if($this->session->userdata('radio') == $row->id) { echo "selected=\"selected\""; } ?>><?php echo $row->radio; ?></option>
|
<option value="<?php echo $row->id; ?>" <?php if($this->session->userdata('radio') == $row->id) { echo "selected=\"selected\""; } ?>><?php echo $row->radio; ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
|
<label class="my-1 mr-2" for="decontSelect">Spots de</label>
|
||||||
|
<select class="form-control-sm my-1 mr-sm-2" id="decontSelect" name="dxcluster_decont" aria-describedby="dxcluster_decontHelp" required>
|
||||||
|
<option value="Any">*</option>
|
||||||
|
<option value="AF"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'AF') { echo " selected"; } ?>>Africa</option>
|
||||||
|
<option value="AN"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'AN') { echo " selected"; } ?>>Antarctica</option>
|
||||||
|
<option value="AS"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'AS') { echo " selected"; } ?>>Asia</option>
|
||||||
|
<option value="EU"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'EU') { echo " selected"; } ?>>Europe</option>
|
||||||
|
<option value="NA"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'NA') { echo " selected"; } ?>>North America</option>
|
||||||
|
<option value="OC"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'OC') { echo " selected"; } ?>>Oceania</option>
|
||||||
|
<option value="SA"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'SA') { echo " selected"; } ?>>South America</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
<label class="my-1 mr-2" for="band"><?php echo lang('gen_hamradio_band'); ?></label>
|
<label class="my-1 mr-2" for="band"><?php echo lang('gen_hamradio_band'); ?></label>
|
||||||
<select id="band" class="form-control-sm my-1 mr-sm-2" name="band">
|
<select id="band" class="form-control-sm my-1 mr-sm-2" name="band">
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ $(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function fill_list(band,maxAgeMinutes) {
|
function fill_list(band,de,maxAgeMinutes) {
|
||||||
let dxurl = dxcluster_provider + "/spots/" + band + "/" +maxAgeMinutes;
|
let dxurl = dxcluster_provider + "/spots/" + band + "/" +maxAgeMinutes + "/" + de;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: dxurl,
|
url: dxurl,
|
||||||
cache: false,
|
cache: false,
|
||||||
|
|
@ -52,12 +52,18 @@ $(function() {
|
||||||
|
|
||||||
$('.spottable').DataTable().order([1, 'asc']);
|
$('.spottable').DataTable().order([1, 'asc']);
|
||||||
$('.spottable').DataTable().clear();
|
$('.spottable').DataTable().clear();
|
||||||
fill_list($('#band option:selected').val(),30);
|
fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),30);
|
||||||
setInterval(function () { fill_list($('#band option:selected').val(),30); },60000);
|
setInterval(function () { fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),30); },60000);
|
||||||
|
|
||||||
|
$("#decontSelect").on("change",function() {
|
||||||
|
$('.spottable').DataTable().clear();
|
||||||
|
fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),30);
|
||||||
|
});
|
||||||
|
|
||||||
$("#band").on("change",function() {
|
$("#band").on("change",function() {
|
||||||
$('.spottable').DataTable().order([1, 'asc']);
|
$('.spottable').DataTable().order([1, 'asc']);
|
||||||
$('.spottable').DataTable().clear();
|
$('.spottable').DataTable().clear();
|
||||||
fill_list($('#band option:selected').val(),30);
|
fill_list($('#band option:selected').val(), $('#decontSelect option:selected').val(),30);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用