Porównaj commity

...

14 Commity

Autor SHA1 Wiadomość Data
DJ3CE fbbbdf04e0
Merge 181dcbe53c into dc294ef54f 2024-04-20 10:11:38 +02:00
Peter Goodhall dc294ef54f Update .gitignore 2024-04-19 17:46:10 +01:00
Peter Goodhall 925656ab96 Added a few items to gitignore 2024-04-19 17:44:45 +01:00
Peter Goodhall e2a9641383 draft to build a map with wab map geo overlay 2024-04-18 17:42:34 +01:00
Peter Goodhall efa597f0d9 Created new asset folder called kmz and added wabsquares 2024-04-17 22:42:18 +01:00
Peter Goodhall 42e76d8aa6
Fix SSTV localization strings 2024-04-16 13:59:50 +01:00
Peter Goodhall 4dc074241d
Merge pull request #3080 from nolith/qso_labels_awards
Print activator references on QSO labels
2024-04-16 13:59:02 +01:00
Alessio Caiazza cb85ad2144
Print activator references on QSO labels 2024-04-15 21:50:27 +02:00
Peter Goodhall 01ba223c27 Revert "Update pota.txt"
This reverts commit b551ba3a30.
2024-04-14 17:06:42 +01:00
Peter Goodhall 73032061e4 Tag 2.6.9 2024-04-14 16:23:57 +01:00
Patrick Burns 134d6bcf98 add sstv strings to the rest of the language files 2024-04-07 12:27:05 -05:00
DJ3CE 181dcbe53c Fixes matching to 'anywhere', isolates and restructures code
- server side matches anywhere, thus replace `startsWith` by `includes`,
- callsigns *should* be with stroked-0, improving consistency here,
- code restructuring (reduce nesting a lot),
- isolating code, same codebase for qso.js and contesting.js, could
  be put in a 'lib'-like file
2024-04-04 19:09:22 +02:00
DJ3CE aaf7f994aa Updates, refinements, etc
- fix '0'
- improvements in data handling
- filter allows prefixes
2024-03-29 16:13:10 +01:00
DJ3CE 15e2e10528 Reduce calling scp, cache result 2024-03-25 11:34:35 +01:00
32 zmienionych plików z 217350 dodań i 54858 usunięć

2
.gitignore vendored
Wyświetl plik

@ -18,3 +18,5 @@
sync.sh
*.p12
*.swp
.env
/node_modules

Wyświetl plik

@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 177;
$config['migration_version'] = 178;
/*
|--------------------------------------------------------------------------

Wyświetl plik

@ -498,6 +498,13 @@ class Awards extends CI_Controller {
$this->load->view('awards/was/index');
$this->load->view('interface_assets/footer', $footerData);
}
public function wab() {
// Render page
$data['page_title'] = "Awards - Worked All Britain";
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wab/index');
$this->load->view('interface_assets/footer');
}
public function iota () {
$this->load->model('iota');

Wyświetl plik

@ -135,10 +135,11 @@ class Labels extends CI_Controller {
$offset = xss_clean($this->input->post('startat'));
$grid = $this->input->post('grid') === "true" ? 1 : 0;
$via = $this->input->post('via') === "true" ? 1 : 0;
$awards = $this->input->post('awards') === "true" ? 1 : 0;
$this->load->model('labels_model');
$result = $this->labels_model->export_printrequestedids($ids);
$this->prepareLabel($result, true, $offset, $grid, $via);
$this->prepareLabel($result, true, $offset, $grid, $via, $awards);
}
public function print($station_id) {
@ -146,18 +147,19 @@ class Labels extends CI_Controller {
$offset = xss_clean($this->input->post('startat'));
$grid = xss_clean($this->input->post('grid') ?? 0);
$via = xss_clean($this->input->post('via') ?? 0);
$awards = xss_clean($this->input->post('awards') ?? 0);
$this->load->model('stations');
if ($this->stations->check_station_is_accessible($station_id)) {
$this->load->model('labels_model');
$result = $this->labels_model->export_printrequested($clean_id);
$this->prepareLabel($result, false, $offset, $grid, $via);
$this->prepareLabel($result, false, $offset, $grid, $via, $awards);
} else {
redirect('labels');
}
}
function prepareLabel($qsos, $jscall = false, $offset = 1, $grid = false, $via = false) {
function prepareLabel($qsos, $jscall = false, $offset = 1, $grid = false, $via = false, $awards = false) {
$this->load->model('labels_model');
$label = $this->labels_model->getDefaultLabel();
@ -232,11 +234,7 @@ class Labels extends CI_Controller {
}
if ($qsos->num_rows() > 0) {
if ($label->qsos == 1) {
$this->makeMultiQsoLabel($qsos->result(), $pdf, 1, $offset, $ptype->orientation, $grid, $via);
} else {
$this->makeMultiQsoLabel($qsos->result(), $pdf, $label->qsos, $offset, $ptype->orientation, $grid, $via);
}
$this->makeMultiQsoLabel($qsos->result(), $pdf, $label->qsos, $offset, $ptype->orientation, $grid, $via, $awards);
} else {
$this->session->set_flashdata('message', '0 QSOs found for print!');
redirect('labels');
@ -244,7 +242,7 @@ class Labels extends CI_Controller {
$pdf->Output();
}
function makeMultiQsoLabel($qsos, $pdf, $numberofqsos, $offset, $orientation, $grid, $via) {
function makeMultiQsoLabel($qsos, $pdf, $numberofqsos, $offset, $orientation, $grid, $via, $awards) {
$text = '';
$current_callsign = '';
$current_sat = '';
@ -261,7 +259,7 @@ class Labels extends CI_Controller {
( ($qso->COL_BAND_RX !== $current_sat_bandrx) && ($this->pretty_sat_mode($qso->COL_SAT_MODE) !== '')) ) {
// ((($qso->COL_SAT_NAME ?? '' !== $current_sat) || ($qso->COL_CALL !== $current_callsign)) && ($qso->COL_SAT_NAME ?? '' !== '') && ($col->COL_BAND_RX ?? '' !== $current_sat_bandrx))) {
if (!empty($qso_data)) {
$this->finalizeData($pdf, $current_callsign, $qso_data, $numberofqsos, $orientation, $grid, $via);
$this->finalizeData($pdf, $current_callsign, $qso_data, $numberofqsos, $orientation, $grid, $via, $awards);
$qso_data = [];
}
$current_callsign = $qso->COL_CALL;
@ -281,19 +279,46 @@ class Labels extends CI_Controller {
'sat_mode' => $this->pretty_sat_mode($qso->COL_SAT_MODE ?? ''),
'sat_band_rx' => ($qso->COL_BAND_RX ?? ''),
'qsl_recvd' => $qso->COL_QSL_RCVD,
'mycall' => $qso->COL_STATION_CALLSIGN
'mycall' => $qso->COL_STATION_CALLSIGN,
'awards' => $this->stationAwardsList($qso)
];
}
if (!empty($qso_data)) {
$this->finalizeData($pdf, $current_callsign, $qso_data, $numberofqsos, $orientation, $grid, $via);
$this->finalizeData($pdf, $current_callsign, $qso_data, $numberofqsos, $orientation, $grid, $via, $awards);
}
}
function stationAwardsList($station_profile) {
$awards = "";
if (trim($station_profile->station_iota) !== '') {
$awards .= "IOTA:" . $station_profile->station_iota . " ";
}
if (trim($station_profile->station_sota) !== '') {
$awards .= "SOTA:" . $station_profile->station_sota . " ";
}
if (trim($station_profile->station_wwff) !== '') {
$awards .= "WWFF:" . $station_profile->station_wwff . " ";
}
if (trim($station_profile->station_pota) !== '') {
$awards .= "POTA:" . $station_profile->station_pota . " ";
}
if (trim($station_profile->station_sig) !== '' && trim($station_profile->station_sig_info) !== '') {
$awards .= $station_profile->station_sig . ":" . $station_profile->station_sig_info;
}
return $awards;
}
// New begin
function pretty_sat_mode($sat_mode) {
return(strlen($sat_mode ?? '') == 2 ? (strtoupper($sat_mode[0]).'/'.strtoupper($sat_mode[1])) : strtoupper($sat_mode ?? ''));
}
function finalizeData($pdf, $current_callsign, &$preliminaryData, $qso_per_label,$orientation, $grid, $via) {
function finalizeData($pdf, $current_callsign, &$preliminaryData, $qso_per_label,$orientation, $grid, $via, $awards) {
$tableData = [];
$count_qso = 0;
@ -313,7 +338,7 @@ class Labels extends CI_Controller {
if($count_qso == $qso_per_label){
$this->generateLabel($pdf, $current_callsign, $tableData,$count_qso,$qso,$orientation, $grid, $via);
$this->generateLabel($pdf, $current_callsign, $tableData,$count_qso,$qso,$orientation, $grid, $via, $awards);
$tableData = []; // reset the data
$count_qso = 0; // reset the counter
}
@ -321,12 +346,12 @@ class Labels extends CI_Controller {
}
// generate label for remaining QSOs
if($count_qso > 0){
$this->generateLabel($pdf, $current_callsign, $tableData,$count_qso,$qso,$orientation, $grid, $via);
$this->generateLabel($pdf, $current_callsign, $tableData,$count_qso,$qso,$orientation, $grid, $via, $awards);
$preliminaryData = []; // reset the data
}
}
function generateLabel($pdf, $current_callsign, $tableData,$numofqsos,$qso,$orientation,$grid=true, $via=false){
function generateLabel($pdf, $current_callsign, $tableData,$numofqsos,$qso,$orientation,$grid=true, $via=false, $awards=false){
$builder = new \AsciiTable\Builder();
$builder->addRows($tableData);
$text = "Confirming QSO".($numofqsos>1 ? 's' : '')." with ";
@ -347,6 +372,7 @@ class Labels extends CI_Controller {
}
$text.="\n";
if ($grid) { $text .= "My call: ".$qso['mycall']." Grid: ".$qso['mygrid']."\n"; }
if ($awards) { $text .= $qso['awards']."\n"; }
$text .= "Thanks for the QSO".($numofqsos>1 ? 's' : '');
$text .= " | ".($qso['qsl_recvd'] == 'Y' ? 'TNX' : 'PSE')." QSL";
$pdf->Add_Label($text,$orientation);

Wyświetl plik

@ -55,7 +55,7 @@ class Lookup extends CI_Controller {
public function scp() {
if($_POST['callsign']) {
$uppercase_callsign = strtoupper($_POST['callsign']);
$uppercase_callsign = str_replace('Ø', '0', strtoupper($_POST['callsign']));
}
// SCP results from logbook
@ -106,7 +106,7 @@ class Lookup extends CI_Controller {
foreach ($arCalls as $strCall)
{
echo " " . $strCall . " ";
echo $strCall . " ";
}
}

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Чрез';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL Cards';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -79,6 +79,10 @@ $lang['general_word_qslcard_bureau'] = '卡片局';
$lang['general_word_qslcard_electronic'] = '电子卡片';
$lang['general_word_qslcard_manager'] = '卡片管理员';
$lang['general_word_qslcard_via'] = '通过via';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_eqslcard'] = '电子 QSL 卡片';
$lang['general_word_eqslcards'] = 'eQSL 卡片';
$lang['general_word_lotw'] = 'Logbook of the WorldLoTW';

Wyświetl plik

@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = '比赛日志(手动)';
$lang['menu_bandmap'] = '波段地图';
$lang['menu_view_qsl'] = '浏览QSL卡片';
$lang['menu_view_eqsl'] = '浏览eQSL卡片';
$lang['menu_view_sstv'] = 'View SSTV Images';
$lang['menu_notes'] = '笔记';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Správce';
$lang['general_word_qslcard_via'] = 'Přes';
$lang['general_word_eqslcard'] = 'eQSL karta';
$lang['general_word_eqslcards'] = 'eQSL karty';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Uložit závodní log';
$lang['menu_bandmap'] = 'Bandmap';
$lang['menu_view_qsl'] = 'Zobrazit QSL';
$lang['menu_view_eqsl'] = 'Zobrazit eQSL';
$lang['menu_view_sstv'] = 'View SSTV Images';
$lang['menu_notes'] = 'Poznámky';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Via';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL Cards';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Manageri';
$lang['general_word_qslcard_via'] = 'Via';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL Cards';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
$lang['menu_bandmap'] = 'Bandikartta';
$lang['menu_view_qsl'] = 'Näytä QSL';
$lang['menu_view_eqsl'] = 'Näytä eQSL';
$lang['menu_view_sstv'] = 'View SSTV Images';
$lang['menu_notes'] = 'Muistio';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = "Manager";
$lang['general_word_qslcard_via'] = "Via";
$lang['general_word_eqslcard'] = "Carte eQSL";
$lang['general_word_eqslcards'] = "Cartes eQSL";
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = "Logbook of the World";
$lang['general_word_lotw_short'] = "LoTW";

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Διευθυντής';
$lang['general_word_qslcard_via'] = 'Μέσω';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'Κάρτες eQSL';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Via';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'Cartoline eQSL';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Via';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL Cards';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -82,6 +82,10 @@ $lang['general_word_qslcard_manager'] = 'Менеджер';
$lang['general_word_qslcard_via'] = 'через';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Журнал прошедших сорев
$lang['menu_bandmap'] = 'План диапазонов';
$lang['menu_view_qsl'] = 'Просмотр QSL';
$lang['menu_view_eqsl'] = 'Просмотр eQSL';
$lang['menu_view_sstv'] = 'View SSTV Images';
$lang['menu_notes'] = 'Заметки';

Wyświetl plik

@ -82,6 +82,10 @@ $lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Vía';
$lang['general_word_eqslcard'] = 'Tarjeta eQSL';
$lang['general_word_eqslcards'] = 'Tarjetas eQSL';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Registrar Entrada de Concurso';
$lang['menu_bandmap'] = 'mapa de Bandas';
$lang['menu_view_qsl'] = 'Ver Tarjetas QSL';
$lang['menu_view_eqsl'] = 'Ver Tarjetas eQSL';
$lang['menu_view_sstv'] = 'View SSTV Images';
$lang['menu_notes'] = 'Notas';

Wyświetl plik

@ -25,7 +25,7 @@ $lang['general_word_enabled'] = "Enabled";
$lang['general_word_disabled'] = "Disabled";
$lang['general_word_count'] = "Count";
$lang['general_word_filtering_on'] = "Filtering on";
$lang['general_word_never'] = "Never";
$lang['general_word_never'] = "Never";
$lang['general_word_export'] = "Export";
$lang['general_word_import'] = "Import";
$lang['general_word_startdate'] = "Start Date";
@ -82,6 +82,10 @@ $lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Via';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL Cards';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';
@ -125,8 +129,8 @@ $lang['gen_hamradio_callsign'] = 'Signal';
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Mode';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Skickat';
$lang['gen_hamradio_rst_rcvd'] = 'Mottagen\'d';
$lang['gen_hamradio_band'] = 'Band';

Wyświetl plik

@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Tävlingsloggning';
$lang['menu_bandmap'] = 'Bandkarta';
$lang['menu_view_qsl'] = 'Se QSL';
$lang['menu_view_eqsl'] = 'Se eQSL';
$lang['menu_view_sstv'] = 'View SSTV Images';
$lang['menu_notes'] = 'Anteckningar';

Wyświetl plik

@ -81,6 +81,10 @@ $lang['general_word_qslcard_manager'] = 'Yönetici';
$lang['general_word_qslcard_via'] = 'üzerinden';
$lang['general_word_eqslcard'] = 'eQSL Card';
$lang['general_word_eqslcards'] = 'eQSL Kartları';
$lang['general_word_sstv_management'] = 'SSTV Management';
$lang['general_word_sstvimages'] = 'SSTV Images';
$lang['general_sstv_upload'] = 'Uploaded SSTV images';
$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)';
$lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_word_lotw_short'] = 'LoTW';

Wyświetl plik

@ -0,0 +1,30 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* Tag Cloudlog as 2.6.9
*/
class Migration_tag_2_6_9 extends CI_Migration {
public function up()
{
// Tag Cloudlog 2.6.3
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '2.6.9'));
// Trigger Version Info Dialog
$this->db->where('option_type', 'version_dialog');
$this->db->where('option_name', 'confirmed');
$this->db->update('user_options', array('option_value' => 'false'));
}
public function down()
{
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '2.6.8'));
}
}

Wyświetl plik

@ -0,0 +1,98 @@
<div class="container">
<!-- Award Info Box -->
<br>
<div id="awardInfoButton">
<script>
var lang_awards_info_button = "<?php echo lang('awards_info_button'); ?>";
var lang_award_info_ln1 = "<?php echo lang('awards_vucc_description_ln1'); ?>";
var lang_award_info_ln2 = "<?php echo lang('awards_vucc_description_ln2'); ?>";
var lang_award_info_ln3 = "<?php echo lang('awards_vucc_description_ln3'); ?>";
var lang_award_info_ln4 = "<?php echo lang('awards_vucc_description_ln4'); ?>";
</script>
<h2><?php echo $page_title; ?></h2>
<button type="button" class="btn btn-sm btn-primary me-1" id="displayAwardInfo"><?php echo lang('awards_info_button'); ?></button>
</div>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<script src='//api.tiles.mapbox.com/mapbox.js/plugins/leaflet-omnivore/v0.3.1/leaflet-omnivore.min.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<div id="map" style="width: 100%; height: 100vh;"></div>
<script>
var wab_squares = $.ajax({
url: "http://cloudlog.mg/assets/json/WABSquares.geojson",
dataType: "json",
success: console.log("WAB data successfully loaded."),
error: function(xhr) {
alert(xhr.statusText)
}
})
$.when(wab_squares).done(function() {
var map = L.map('map').setView([51.5074, -0.1278], 7);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
console.log(wab_squares.responseJSON);
// Add requested external GeoJSON to map
var kywab_squares = L.geoJSON(wab_squares.responseJSON, {
style: function(feature) {
if (feature.properties.name === 'Small Square SP50 Boundry Box') {
return {
fillColor: '#5cb85c',
fill: true,
fillOpacity: 1,
};
} else {
return {};
}
},
pointToLayer: function(feature, latlng) {
if (feature.properties && feature.properties.name) {
// Create a custom icon that displays the name from the GeoJSON data
var labelIcon = L.divIcon({
className: 'text-labels', // Set class for CSS styling
html: feature.properties.name
});
// Create a marker at the location of the point
return L.marker(latlng, {
icon: labelIcon
});
}
},
onEachFeature: function(feature, layer) {
layer.on('click', function() {
// Code to execute when the area is clicked
alert('Area clicked: ' + feature.properties.name);
});
}
}).addTo(map);
// Function to update labels based on zoom level
function updateLabels() {
var currentZoom = map.getZoom();
kywab_squares.eachLayer(function(layer) {
if (currentZoom >= 8) {
// Show labels if zoom level is 10 or higher
layer.getElement().style.display = 'block';
} else {
// Hide labels if zoom level is less than 10
layer.getElement().style.display = 'none';
}
});
}
// Update labels when the map zoom changes
map.on('zoomend', updateLabels);
// Update labels immediately after adding the GeoJSON data to the map
updateLabels();
});
</script>
</div>

Wyświetl plik

@ -11,6 +11,12 @@
<input class="form-check-input" type="checkbox" name="via" id="via">
</div>
</div>
<div class="mb-3 row">
<label class="my-1 me-2 col-md-4" for="via">Include awards?</label>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="awards" id="awards">
</div>
</div>
<div class="mb-3 row">
<label class="my-1 me-2 col-md-4" for="startat">Start printing at?</label>
<div class="d-flex align-items-center">

Wyświetl plik

@ -207,31 +207,23 @@ $('#start_date').change(function () {
});
// On Key up check and suggest callsigns
$("#callsign").keyup(function () {
var call = $(this).val();
if (call.length >= 3) {
$("#callsign").keyup(scp_keyup({
selector: $("#callsign"),
showSuggestions: function (call, text) {
$('.callsign-suggestions').text(text);
highlight(call);
}
}));
$.ajax({
url: 'lookup/scp',
method: 'POST',
data: {
callsign: $(this).val().toUpperCase()
},
success: function (result) {
$('.callsign-suggestions').text(result);
highlight(call.toUpperCase());
}
});
// moved to blur
// checkIfWorkedBefore();
var qTable = $('.qsotable').DataTable();
qTable.search(call).draw();
}
else if (call.length <= 2) {
$('.callsign-suggestions').text("");
}
$("#callsign").keyup(function() {
const call = $(this).val().toUpperCase();
if (call.length >= 3) {
var qTable = $('.qsotable').DataTable();
qTable.search(call).draw();
}
});
function checkIfWorkedBefore() {
var call = $("#callsign").val();
if (call.length >= 3) {
@ -670,3 +662,62 @@ function getUTCDateStamp(el) {
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCDate()).slice(-2) + '-' + ("0" + (now.getUTCMonth() + 1)).slice(-2) + '-' + now.getUTCFullYear());
}
function scp_keyup(options) {
// options must have two keys:
// * selector - element, with .val() which gives the entered callsign
// * showSuggestions - function(call, text), where the text is
// the list of callsign-suggestions
const scp = {
request: "",
data: []
};
const callFromInput = (el) => el.val().toUpperCase().replace('0','Ø');
const checkCacheValid = (call) => (scp.request != "" && call.includes(scp.request));
const filterCallsignList = function (call) {
return scp.data?.filter((el) => (el.includes(call) == true)).join(' ') || '';
};
const updateSuggestions = function (call) {
const suggestions = filterCallsignList(call);
options.showSuggestions(call, suggestions);
}
const keyup = function(){
const call = callFromInput(options.selector);
if (call.length < 3) {
options.showSuggestions("", "");
return;
}
if ( checkCacheValid(call) ) {
updateSuggestions(call);
return;
}
// Cache invalid, so update it and reset suggestions
options.showSuggestions("");
scp.request = call;
scp.data = [];
$.ajax({
url: 'lookup/scp',
method: 'POST',
data: {
callsign: call
},
success: function (result) {
const call_now = callFromInput(options.selector);
if (checkCacheValid(call_now)) {
scp.data = result.split(" ");
updateSuggestions(call_now);
}
}
});
};
return keyup;
}

Wyświetl plik

@ -1017,22 +1017,13 @@ $("#callsign").on("keypress", function(e) {
});
// On Key up check and suggest callsigns
$("#callsign").keyup(function() {
if ($(this).val().length >= 3) {
$('.callsign-suggest').show();
$callsign = $(this).val().replace('Ø', '0');
$.ajax({
url: 'lookup/scp',
method: 'POST',
data: {
callsign: $callsign.toUpperCase()
},
success: function(result) {
$('.callsign-suggestions').text(result);
}
});
}
});
$("#callsign").keyup( scp_keyup({
selector: $(this),
showSuggestions: function (call, text) {
$('.callsign-suggestions').text(text);
$('.callsign-suggest').show();
}
}));
//Reset QSO form Fields function
function resetDefaultQSOFields() {
@ -1094,3 +1085,62 @@ function testTimeOffConsistency() {
}
return true;
}
function scp_keyup(options) {
// options must have two keys:
// * selector - element, with .val() which gives the entered callsign
// * showSuggestions - function(call, text), where the text is
// the list of callsign-suggestions
const scp = {
request: "",
data: []
};
const callFromInput = (el) => el.val().toUpperCase().replace('0','Ø');
const checkCacheValid = (call) => (scp.request != "" && call.includes(scp.request));
const filterCallsignList = function (call) {
return scp.data?.filter((el) => (el.includes(call) == true)).join(' ') || '';
};
const updateSuggestions = function (call) {
const suggestions = filterCallsignList(call);
options.showSuggestions(call, suggestions);
}
const keyup = function(){
const call = callFromInput(options.selector);
if (call.length < 3) {
options.showSuggestions("", "");
return;
}
if ( checkCacheValid(call) ) {
updateSuggestions(call);
return;
}
// Cache invalid, so update it and reset suggestions
options.showSuggestions("");
scp.request = call;
scp.data = [];
$.ajax({
url: 'lookup/scp',
method: 'POST',
data: {
callsign: call
},
success: function (result) {
const call_now = callFromInput(options.selector);
if (checkCacheValid(call_now)) {
scp.data = result.split(" ");
updateSuggestions(call_now);
}
}
});
};
return keyup;
}

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff