Add theme for color impaired hams (based on default) (#2497)

This commit is contained in:
Florian (DF2ET)
2025-11-16 13:58:58 +01:00
committed by GitHub
parent c401fa437a
commit c2f98f18fb
71 changed files with 12676 additions and 277 deletions

View File

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

View File

@@ -38,6 +38,8 @@ class Activated_gridmap extends CI_Controller {
$data['gridsquares_fields_not_confirmed'] = __("Fields not confirmed");
$data['gridsquares_fields_total_worked'] = __("Total fields worked");
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$footerData = [];
$footerData['scripts'] = [
'assets/js/leaflet/geocoding.js',

View File

@@ -8,12 +8,21 @@
class Awards extends CI_Controller {
private $user_map_color_qso;
private $user_map_color_qsoconfirm;
private $user_map_color_unworked;
function __construct()
{
parent::__construct();
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
$map_custom = json_decode($this->optionslib->get_map_custom());
$this->user_map_color_qso = $map_custom->qso->color;
$this->user_map_color_qsoconfirm = $map_custom->qsoconfirm->color;
$this->user_map_color_unworked = $map_custom->unworked->color ?? '';
}
public function index()
@@ -30,6 +39,7 @@ class Awards extends CI_Controller {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$this->load->model('dok');
$this->load->model('bands');
@@ -104,6 +114,7 @@ class Awards extends CI_Controller {
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['worked_bands'] = $this->bands->get_worked_bands('dxcc'); // Used in the view for band select
$data['modes'] = $this->modes->active(); // Used in the view for mode select
@@ -189,6 +200,7 @@ class Awards extends CI_Controller {
$data['worked_bands'] = $this->bands->get_worked_bands('wapc');
$data['modes'] = $this->modes->active();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
@@ -326,6 +338,7 @@ class Awards extends CI_Controller {
$data['waja_array'] = $this->waja->get_waja_array($bands, $postdata);
$data['waja_summary'] = $this->waja->get_waja_summary($bands, $postdata);
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render Page
$data['page_title'] =__( "Awards - WAJA");
@@ -347,6 +360,7 @@ class Awards extends CI_Controller {
$data['worked_bands'] = $this->bands->get_worked_bands('jcc');
$data['modes'] = $this->modes->active();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
@@ -438,6 +452,7 @@ class Awards extends CI_Controller {
public function jcc_cities() {
$this->load->model('Jcc_model');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data = $this->Jcc_model->jccCities();
header('Content-Type: application/json');
echo json_encode($data, JSON_PRETTY_PRINT);
@@ -447,6 +462,7 @@ class Awards extends CI_Controller {
public function vucc() {
$this->load->model('vucc');
$this->load->model('bands');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['worked_bands'] = $this->bands->get_worked_bands('vucc');
$data['vucc_array'] = $this->vucc->get_vucc_array($data);
@@ -460,9 +476,11 @@ class Awards extends CI_Controller {
public function vucc_band(){
$this->load->model('vucc');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$band = str_replace('"', "", $this->security->xss_clean($this->input->get("Band")));
$type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type")));
$data['vucc_array'] = $this->vucc->vucc_details($band, $type);
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['type'] = $type;
// Render Page
@@ -562,6 +580,7 @@ class Awards extends CI_Controller {
// Grab all worked sota stations
$this->load->model('sota');
$data['sota_all'] = $this->sota->get_all();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render page
$data['page_title'] = sprintf(__("Awards - %s"), __("SOTA"));
@@ -579,6 +598,7 @@ class Awards extends CI_Controller {
// Grab all worked wwff stations
$this->load->model('wwff');
$data['wwff_all'] = $this->wwff->get_all();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render page
$data['page_title'] = sprintf(__("Awards - %s"), __("WWFF"));
@@ -596,6 +616,7 @@ class Awards extends CI_Controller {
// Grab all worked pota stations
$this->load->model('pota');
$data['pota_all'] = $this->pota->get_all();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render page
$data['page_title'] = sprintf(__("Awards - %s"), __("POTA"));
@@ -619,6 +640,7 @@ class Awards extends CI_Controller {
$this->load->model('bands');
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
@@ -728,6 +750,7 @@ class Awards extends CI_Controller {
$data['was_array'] = $this->was->get_was_array($bands, $postdata);
$data['was_summary'] = $this->was->get_was_summary($bands, $postdata);
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render Page
$data['page_title'] = sprintf(__("Awards - %s"), __("Worked All States (WAS)"));;
@@ -750,6 +773,7 @@ class Awards extends CI_Controller {
$data['worked_bands'] = $this->bands->get_worked_bands('rac');
$data['modes'] = $this->modes->active(); // Used in the view for mode select
$data['user_map_custom'] = $this->optionslib->get_map_custom();
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
@@ -852,6 +876,7 @@ class Awards extends CI_Controller {
$data['helvetia_array'] = $this->helvetia_model->get_helvetia_array($bands, $postdata);
$data['helvetia_summary'] = $this->helvetia_model->get_helvetia_summary($bands, $postdata);
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render Page
$data['page_title'] =sprintf(__("Awards - %s"), __("H26"));
@@ -872,6 +897,8 @@ class Awards extends CI_Controller {
return null;
}
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$data['worked_bands'] = $this->bands->get_worked_bands('iota'); // Used in the view for band select
@@ -946,6 +973,7 @@ class Awards extends CI_Controller {
public function counties() {
$this->load->model('counties');
$data['counties_array'] = $this->counties->get_counties_array();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render Page
$data['page_title'] = sprintf(__("Awards - %s"), __("US Counties"));
@@ -960,6 +988,7 @@ class Awards extends CI_Controller {
$type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type")));
$data['counties_array'] = $this->counties->counties_details($state, $type);
$data['type'] = $type;
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render Page
$data['page_title'] = __("US Counties");
@@ -990,6 +1019,8 @@ class Awards extends CI_Controller {
$this->load->model('gridmap_model');
$this->load->model('stations');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['homegrid']= explode(',', $this->stations->find_gridsquare());
$data['modes'] = $this->gridmap_model->get_worked_modes();
@@ -1026,6 +1057,9 @@ class Awards extends CI_Controller {
$this->load->model('ffma_model');
$this->load->model('stations');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['homegrid']= explode(',', $this->stations->find_gridsquare());
$data['layer']= $this->optionslib->get_option('option_map_tile_server');
@@ -1219,6 +1253,7 @@ class Awards extends CI_Controller {
$this->load->model('sig');
$data['sig_types'] = $this->sig->get_all_sig_types();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render page
$data['page_title'] = sprintf(__("Awards - %s"), __("SIG"));
@@ -1237,6 +1272,7 @@ class Awards extends CI_Controller {
$type = str_replace('"', "", $this->security->xss_clean($this->input->get("type")));
$data['sig_all'] = $this->sig->get_all($type);
$data['type'] = $type;
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render page
$data['page_title'] = __("Awards - SIG - ") . $type;
@@ -1369,6 +1405,7 @@ class Awards extends CI_Controller {
$data['wap_array'] = $this->wap->get_wap_array($bands, $postdata);
$data['wap_summary'] = $this->wap->get_wap_summary($bands, $postdata);
$data['user_map_custom'] = $this->optionslib->get_map_custom();
// Render Page
$data['page_title'] = sprintf(__("Awards - %s"), __("WAP"));
@@ -1567,7 +1604,7 @@ class Awards extends CI_Controller {
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$cq_array = $this->cq->get_cq_array($bands, $postdata, $location_list);
$cq_array = $this->cq->get_cq_array($bands, $postdata, $location_list, $this->user_map_color_qso, $this->user_map_color_qsoconfirm);
} else {
$location_list = null;
$cq_array = null;
@@ -1838,6 +1875,7 @@ class Awards extends CI_Controller {
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['user_default_confirmation'] = $this->session->userdata('user_default_confirmation');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$footerData = [];
$footerData['scripts'] = [
@@ -1931,6 +1969,7 @@ class Awards extends CI_Controller {
$this->load->model('itu');
$this->load->model('modes');
$this->load->model('bands');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
$data['modes'] = $this->modes->active(); // Used in the view for mode select
@@ -2057,6 +2096,7 @@ class Awards extends CI_Controller {
$data['worked_bands'] = $this->bands->get_worked_bands();
$data['modes'] = $this->modes->active(); // Used in the view for mode select
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
@@ -2128,6 +2168,7 @@ class Awards extends CI_Controller {
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['worked_bands'] = $this->bands->get_worked_bands('dxcc'); // Used in the view for band select
$data['modes'] = $this->modes->active(); // Used in the view for mode select
@@ -2203,6 +2244,7 @@ class Awards extends CI_Controller {
// Grab all worked stations on AO-73
$this->load->model('Seven3on73');
$data['seven3on73_array'] = $this->Seven3on73->get_all();
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['page_title'] = sprintf(__("Awards - %s"), __("73 on 73"));
$this->load->view('interface_assets/header', $data);
@@ -2223,6 +2265,7 @@ class Awards extends CI_Controller {
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['worked_bands'] = $this->bands->get_worked_bands('dxcc'); // Used in the view for band select
$data['modes'] = $this->modes->active(); // Used in the view for mode select

View File

@@ -39,6 +39,8 @@ class Gridmap extends CI_Controller {
$data['gridsquares_fields_not_confirmed'] = __("Fields not confirmed");
$data['gridsquares_fields_total_worked'] = __("Total fields worked");
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$footerData = [];
$footerData['scripts'] = [
'assets/js/leaflet/geocoding.js',

View File

@@ -67,6 +67,7 @@ class Lookup extends CI_Controller {
$data['dok'] = xss_clean($this->input->post('dok'));
$data['continent'] = xss_clean($this->input->post('continent'));
$data['location_list'] = $location_list;
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$data['result'] = $this->lookup_model->getSearchResult($data);
$this->load->view('lookup/result', $data);
@@ -78,6 +79,7 @@ class Lookup extends CI_Controller {
$this->load->model('lookup_model');
$this->load->model('bands');
$this->load->model('logbooks_model');
$data['user_map_custom'] = $this->optionslib->get_map_custom();
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$data['location_list'] = "'".implode("','",$logbooks_locations_array)."'";
$data['callsign'] = xss_clean($this->input->post('callsign'));

View File

@@ -890,6 +890,7 @@ class User extends CI_Controller {
$data['user_map_station_color'] = "#0000FF";
$data['user_map_qsoconfirm_icon'] = "0";
$data['user_map_qsoconfirm_color'] = "#00AA00";
$data['user_map_unworked_color'] = "#FF0000";
$data['user_map_gridsquare_show'] = "0";
}
$data['map_icon_select'] = array(
@@ -942,7 +943,7 @@ class User extends CI_Controller {
$user_id = $this->input->post('id', true);
// [MAP Custom] ADD to user options //
$array_icon = array('station','qso','qsoconfirm');
$array_icon = array('station','qso','qsoconfirm', 'unworked');
foreach ($array_icon as $icon) {
$data_options['user_map_'.$icon.'_icon'] = xss_clean($this->input->post('user_map_'.$icon.'_icon', true));
$data_options['user_map_'.$icon.'_color'] = xss_clean($this->input->post('user_map_'.$icon.'_color', true));

View File

@@ -0,0 +1,37 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* This migration adds a theme for color impaired hams (based on default skin)
*/
class Migration_add_color_impaired_theme extends CI_Migration {
public function up()
{
if ($this->entrycheck() == 0) {
$this->dbtry("INSERT INTO `themes` SET name = 'Color Impaired Support', foldername = 'color_impaired', header_logo = 'wavelog_icon_only_default', main_logo = 'wavelog_logo_default', theme_mode = 'light';");
}
}
public function down()
{
if ($this->entrycheck() > 0) {
$this->dbtry("DELETE FROM themes WHERE name = 'Color Impaired Support';");
$this->dbtry("UPDATE `users` SET user_stylesheet = 'default' WHERE user_stylesheet = 'color_impaired';");
}
}
function dbtry($what) {
try {
$this->db->query($what);
} catch (Exception $e) {
log_message("error", "Something gone wrong while altering the themes table: ".$e." // Executing: ".$this->db->last_query());
}
}
function entrycheck() {
return $this->db->query("SELECT * FROM themes WHERE name = 'Color Impaired Support';")->num_rows();
}
}

View File

@@ -23,7 +23,7 @@ class CQ extends CI_Model{
if ($postdata['worked'] != NULL) {
$cqBand = $this->getCQWorked($location_list, $band, $postdata);
foreach ($cqBand as $line) {
$bandCq[$line->col_cqz][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cqz) . '","' . $band . '","All", "All","'. $postdata['mode'] . '","CQZone","")\'>W</a></div>';
$bandCq[$line->col_cqz][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cqz) . '","' . $band . '","All", "All","'. $postdata['mode'] . '","CQZone","")\'>W</a></div>';
$cqZ[$line->col_cqz]['count']++;
}
}

View File

@@ -29,7 +29,7 @@ class DOK extends CI_Model {
$dokBand = $this->getDokWorked($location_list, $band, $postdata);
foreach ($dokBand as $line) {
if (array_key_exists($line->COL_DARC_DOK, $bandDok)) { /* For now ignore DOKs which are logged but not existing in the official lists any more */
$bandDok[$line->COL_DARC_DOK][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->COL_DARC_DOK . '","' . $band . '","All","All","' . $postdata['mode'] . '","DOK", "")\'>W</a></div>';
$bandDok[$line->COL_DARC_DOK][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->COL_DARC_DOK . '","' . $band . '","All","All","' . $postdata['mode'] . '","DOK", "")\'>W</a></div>';
$doks[$line->COL_DARC_DOK]['count']++;
}
}

View File

@@ -90,7 +90,7 @@ class DXCC extends CI_Model {
if ($postdata['worked'] != NULL) {
$workedDXCC = $this->getDxccBandWorked($location_list, $band, $postdata);
foreach ($workedDXCC as $wdxcc) {
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="bg-danger awardsBgDanger" ><a href=\'javascript:displayContacts("'.$wdxcc->dxcc.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="bg-danger awardsBgWarning" ><a href=\'javascript:displayContacts("'.$wdxcc->dxcc.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
}
}

View File

@@ -37,7 +37,7 @@ class helvetia_model extends CI_Model {
if ($postdata['worked'] != NULL) {
$helvetiaBand = $this->gethelvetiaWorked($location_list, $band, $postdata);
foreach ($helvetiaBand as $line) {
$bandhelvetia[$line->col_state][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","helvetia", "")\'>W</a></div>';
$bandhelvetia[$line->col_state][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","helvetia", "")\'>W</a></div>';
$states[$line->col_state]['count']++;
}
}

View File

@@ -22,7 +22,7 @@ class IOTA extends CI_Model {
if ($postdata['worked'] != NULL) {
$workedIota = $this->getIotaBandWorked($location_list, $band, $postdata);
foreach ($workedIota as $wiota) {
$iotaMatrix[$wiota->tag][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("'.$wiota->tag.'","'. $band . '","All","All","'. $postdata['mode'] . '","IOTA")\'>W</a></div>';
$iotaMatrix[$wiota->tag][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("'.$wiota->tag.'","'. $band . '","All","All","'. $postdata['mode'] . '","IOTA")\'>W</a></div>';
}
}

View File

@@ -23,7 +23,7 @@ class Itu extends CI_Model{
if ($postdata['worked'] != NULL) {
$ituBand = $this->getituWorked($location_list, $band, $postdata);
foreach ($ituBand as $line) {
$banditu[$line->col_ituz][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_ituz) . '","' . $band . '","All", "All","'. $postdata['mode'] . '","ITU","")\'>W</a></div>';
$banditu[$line->col_ituz][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_ituz) . '","' . $band . '","All", "All","'. $postdata['mode'] . '","ITU","")\'>W</a></div>';
$ituZ[$line->col_ituz]['count']++;
}
}

View File

@@ -950,7 +950,7 @@ class Jcc_model extends CI_Model {
if ($postdata['worked'] != NULL) {
$jccBand = $this->getJccWorked($this->location_list, $band, $postdata);
foreach ($jccBand as $line) {
$bandJcc[$line->col_cnty][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_cnty . '","' . $band . '","All","All","'. $postdata['mode'] . '","JCC", "")\'>W</a></div>';
$bandJcc[$line->col_cnty][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_cnty . '","' . $band . '","All","All","'. $postdata['mode'] . '","JCC", "")\'>W</a></div>';
$cities[$line->col_cnty]['count']++;
}
}

View File

@@ -38,7 +38,7 @@ class rac extends CI_Model {
if ($postdata['worked'] != NULL) {
$racBand = $this->getracWorked($location_list, $band, $postdata);
foreach ($racBand as $line) {
$bandrac[$line->col_state][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","RAC", "")\'>W</a></div>';
$bandrac[$line->col_state][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","RAC", "")\'>W</a></div>';
$states[$line->col_state]['count']++;
}
}

View File

@@ -25,7 +25,7 @@ class Wac extends CI_Model{
if ($postdata['worked'] != NULL) {
$wacBand = $this->getWACWorked($location_list, $band, $postdata);
foreach ($wacBand as $line) {
$bandWac[$line->col_cont][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cont) . '","' . $band . '","All", "All","'. $postdata['mode'] . '","WAC","")\'>W</a></div>';
$bandWac[$line->col_cont][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cont) . '","' . $band . '","All", "All","'. $postdata['mode'] . '","WAC","")\'>W</a></div>';
$wac[$line->col_cont]['count']++;
}
}

View File

@@ -98,12 +98,12 @@ class WAE extends CI_Model {
if ($postdata['worked'] != NULL) {
$workedDXCC = $this->getDxccBandWorked($this->location_list, $band, $postdata);
foreach ($workedDXCC as $wdxcc) {
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="bg-danger awardsBgDanger" ><a href=\'javascript:displayContacts("'.$wdxcc->dxcc.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE", "")\'>W</a></div>';
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="bg-danger awardsBgWarning" ><a href=\'javascript:displayContacts("'.$wdxcc->dxcc.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE", "")\'>W</a></div>';
}
$workedDXCC = $this->getDxccBandWorked($this->location_list, $band, $postdata, true);
foreach ($workedDXCC as $wdxcc) {
$dxccMatrix[$wdxcc->col_region][$band] = '<div class="bg-danger awardsBgDanger" ><a href=\'javascript:displayContacts("'.$wdxcc->col_region.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE", "")\'>W</a></div>';
$dxccMatrix[$wdxcc->col_region][$band] = '<div class="bg-danger awardsBgWarning" ><a href=\'javascript:displayContacts("'.$wdxcc->col_region.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE", "")\'>W</a></div>';
$waeCount[$wdxcc->col_region]['count']++;
}
}

View File

@@ -81,7 +81,7 @@ class WAJA extends CI_Model {
if ($postdata['worked'] != NULL) {
$wajaBand = $this->getWajaWorked($this->location_list, $band, $postdata);
foreach ($wajaBand as $line) {
$bandWaja[$line->col_state][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAJA", "")\'>W</a></div>';
$bandWaja[$line->col_state][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAJA", "")\'>W</a></div>';
$prefectures[$line->col_state]['count']++;
}
}

View File

@@ -39,7 +39,7 @@ class wap extends CI_Model {
if ($postdata['worked'] != NULL) {
$wapBand = $this->getwapWorked($location_list, $band, $postdata);
foreach ($wapBand as $line) {
$bandwap[$line->col_state][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAP", "")\'>W</a></div>';
$bandwap[$line->col_state][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAP", "")\'>W</a></div>';
$states[$line->col_state]['count']++;
}
}

View File

@@ -71,27 +71,27 @@ class WAPC extends CI_Model {
foreach ($wapcBand as $line) {
// B
if($line->col_dxcc == '318'){
$bandWapc[$line->col_state][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAPC", "")\'>W</a></div>';
$bandWapc[$line->col_state][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAPC", "")\'>W</a></div>';
$provinces[$line->col_state]['count']++;
}
// BS7
else if($line->col_dxcc == '506'){
$bandWapc['HI'][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("HI","' . $band . '","All","All","'. $postdata['mode'] . '","WAPC", "")\'>W</a></div>';
$bandWapc['HI'][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("HI","' . $band . '","All","All","'. $postdata['mode'] . '","WAPC", "")\'>W</a></div>';
$provinces['HI']['count']++;
}
// VR
else if($line->col_dxcc == '321'){
$bandWapc['HK'][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . "321" . '","' . $band . '","All","All","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$bandWapc['HK'][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . "321" . '","' . $band . '","All","All","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$provinces['HK']['count']++;
}
// XX9
else if($line->col_dxcc == '152'){
$bandWapc['MO'][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . "152" . '","' . $band . '","All","All","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$bandWapc['MO'][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . "152" . '","' . $band . '","All","All","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$provinces['MO']['count']++;
}
// BU-BX/BV9P
else if($line->col_dxcc == '386' || $line->col_dxcc == '505'){
$bandWapc['TW'][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . "386" . '","' . $band . '","All","All","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$bandWapc['TW'][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . "386" . '","' . $band . '","All","All","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$provinces['TW']['count']++;
}
}

View File

@@ -36,7 +36,7 @@ class was extends CI_Model {
if ($postdata['worked'] != NULL) {
$wasBand = $this->getWasWorked($location_list, $band, $postdata);
foreach ($wasBand as $line) {
$bandWas[$line->col_state][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAS", "")\'>W</a></div>';
$bandWas[$line->col_state][$band] = '<div class="bg-danger awardsBgWarning"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAS", "")\'>W</a></div>';
$states[$line->col_state]['count']++;
}
}

View File

@@ -20,7 +20,7 @@ class WPX extends CI_Model {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display
//'<div class="bg-danger awardsBgDanger" ><a href=\'javascript:displayContacts("'.$wdxcc->dxcc.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
//'<div class="bg-danger awardsBgWarning" ><a href=\'javascript:displayContacts("'.$wdxcc->dxcc.'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","DXCC2", "")\'>W</a></div>';
$worked = $this->getWpxForBand($band, $location_list, $postdata);
$confirmed = $this->getWpxForBandConfirmed($band, $location_list, $postdata);
$wpxSummary['worked'][$band] = $worked[0]->wpxcount;

View File

@@ -1,3 +1,7 @@
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<div class="container gridsquare_map_form">
<br>

View File

@@ -1,8 +1,11 @@
<script>
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>";
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>";
var lang_general_hamradio_cqzone = "<?= __("CQ Zone"); ?>";
var lang_hover_over_a_zone = "<?= __("Hover over a zone"); ?>";
</script>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#cqmap {
height: calc(100vh - 480px) !important;

View File

@@ -1,4 +1,6 @@
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#dxccmap {
height: calc(100vh - 300px) !important;

View File

@@ -1,3 +1,6 @@
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<div class="container gridsquare_map_form">
<!-- Award Info Box -->

View File

@@ -1,3 +1,7 @@
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<div class="container gridsquare_map_form">
<!-- Award Info Box -->
<br>

View File

@@ -3,6 +3,9 @@
var lang_switzerland_canton = "<?= _pgettext("Switzerland Canton", "Canton"); ?>";
var lang_hover_over_a_canton = "<?= __("Hover over a canton"); ?>";
</script>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#helvetiamap {

View File

@@ -1,4 +1,6 @@
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#iotamap {
height: calc(100vh - 500px) !important;

View File

@@ -3,6 +3,9 @@
var lang_general_hamradio_ituzone = "<?= __("ITU Zone"); ?>";
var lang_hover_over_a_zone = "<?= __("Hover over a zone"); ?>";
</script>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#itumap {
height: calc(100vh - 480px) !important;

View File

@@ -1,5 +1,6 @@
<script>
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"
let tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#jccmap {

View File

@@ -3,6 +3,9 @@
var lang_canada_province = "<?= _pgettext("Canada Province", "Province"); ?>";
var lang_hover_over_a_province = "<?= __("Hover over a province"); ?>";
</script>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#racmap {

View File

@@ -1,7 +1,8 @@
<div class="container">
<script>
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>";
var attributionInfo='<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>';
let tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>";
let attributionInfo='<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>';
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<!-- Award Info Box -->

View File

@@ -3,6 +3,9 @@
var lang_japan_province = "<?= _pgettext("Japan Prefecture", "Prefecture"); ?>";
var lang_hover_over_a_prefecture = "<?= __("Hover over a prefecture"); ?>";
</script>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#wajamap {

View File

@@ -4,6 +4,10 @@
var lang_hover_over_a_state = "<?= __("Hover over a state"); ?>";
</script>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<style>
#wasmap {
height: calc(100vh - 500px) !important;

View File

@@ -52,7 +52,7 @@ function cf_type($qsl, $lotw, $eqsl, $qrz, $clublog) {
if ((($eqsl ?? 'N') == 'Y')) { $string.= 'E'; }
if ((($qrz ?? 'N') == 'Y')) { $string.= 'Z'; }
if ((($clublog ?? 'N') == 'Y')) { $string.= 'C'; }
if ($string == '') { return '<div class="bg-danger awardsBgDanger">-</div>'; }
if ($string == '') { return '<div class="bg-danger awardsBgWarning">-</div>'; }
return '<div class="bg-success awardsBgSuccess">' . $string . '</div>';
}

View File

@@ -4,6 +4,9 @@
text-align: left !important;
}
</style>
<script>
let user_map_custom = JSON.parse('<?php echo $user_map_custom; ?>');
</script>
<div class="container gridsquare_map_form">
<br>

View File

@@ -26,6 +26,18 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/<?php echo $theme; ?>/overrides.css">
<?php } ?>
<?php if (($this->uri->segment(1) == "awards")) {
$colors = json_decode($user_map_custom);?>
<style>
.awardsBgSuccess {
background-color: <?php echo $colors->qsoconfirm->color; ?> !important;
}
.awardsBgWarning {
background-color: <?php echo $colors->qso->color; ?> !important;
}
</style>
<?php } ?>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/fontawesome/css/all.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/jquery.fancybox.min.css" />

View File

@@ -1,5 +1,17 @@
<?php
echo '
$colors = json_decode($user_map_custom);?>
<style>
.awardsBgSuccess {
background-color: <?php echo $colors->qsoconfirm->color; ?> !important;
}
.awardsBgDanger {
background-color: <?php echo $colors->qso->color; ?> !important;
}
</style>
<?php echo '
<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>

View File

@@ -1,3 +1,14 @@
<?php
$colors = json_decode($user_map_custom);?>
<style>
.awardsBgSuccess {
background-color: <?php echo $colors->qsoconfirm->color; ?> !important;
}
.awardsBgDanger {
background-color: <?php echo $colors->qso->color; ?> !important;
}
</style>
<?php
$i = 1;
echo '<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center">

View File

@@ -544,7 +544,7 @@
</div>
<div class="row"> <!-- QSO (default) -->
<div class="mb-3 col-md-4">
<label><?= __("QSO (by default)"); ?></label>
<label><?= __("QSO (worked, not confirmed)"); ?></label>
</div>
<div class="mb-3 col-md-3">
<div class="icon_selectBox" data-boxcontent="qso">
@@ -564,7 +564,7 @@
<div class="row"> <!-- QSO (confirmed) -->
<div class="mb-3 col-md-4">
<label><?= __("QSO (confirmed)"); ?></label>
<small class="form-text text-muted"><?= __("(If 'No', displayed as 'QSO (by default))'"); ?></small>
<small class="form-text text-muted"><?= __("(If 'No', displayed as 'QSO (by default))"); ?></small>
</div>
<div class="mb-3 col-md-3">
<div class="icon_selectBox" data-boxcontent="qsoconfirm">
@@ -581,6 +581,17 @@
<input type="color" class="form-control user_icon_color" name="user_map_qsoconfirm_color" id="user_map_qsoconfirm_color" value="<?php echo $user_map_qsoconfirm_color; ?>" style="padding:initial;<?php echo ($user_map_qsoconfirm_icon=="0")?'display:none;':''; ?>" data-icon="qsoconfirm" />
</div>
</div>
<div class="row"> <!-- Unworked (zones) color -->
<div class="mb-3 col-md-4">
<label><?= __("Unworked (e.g. Zones)"); ?></label>
<small class="form-text text-muted"><?= __("(Color for unworked zones)"); ?></small>
</div>
<div class="mb-3 col-md-3">
</div>
<div class="md-3 col-md-2">
<input type="color" class="form-control user_icon_color" name="user_map_unworked_color" id="user_map_unworked_color" value="<?php echo $user_map_unworked_color ?? 'red'; ?>" style="padding:initial;" data-icon="unworked" />
</div>
</div>
<div class="row">
<div class="md-3 col-md-4">
<label><?= __("Show Locator"); ?></label>

12057
assets/css/color_impaired/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,100 @@
/* Green: #F5793A
* Red: #A95AA1
* Yellow: #FFFF00
* Grey: #C0C0C0
*/
.eqsl-green {
color: #F5793A !important;
}
.eqsl-red {
color: #A95AA1 !important;
}
.eqsl-grey {
color: #C0C0C0 !important;
}
.qsl-green {
color: #F5793A !important;
}
.qsl-red {
color:#A95AA1 !important;
}
.qsl-yellow {
color: #FFFF00 !important;
}
.qsl-grey {
color: #C0C0C0 !important;
}
.lotw-green {
color: #F5793A !important;
}
.lotw-red {
color: #A95AA1 !important;
}
.lotw-grey {
color: #C0C0C0 !important;
}
.clublog-green {
color: #F5793A !important;
}
.clublog-red {
color: #A95AA1 !important;
}
.qrz-green {
color: #F5793A !important;
}
.qrz-red {
color: #A95AA1 !important;
}
.qrz-yellow {
color: #FFFF00 !important;
}
.qrz-grey {
color: #C0C0C0 !important;
}
.lotw_info_yellow {
background-image: linear-gradient(to bottom, #F5793A, #FFFF00);
}
.lotw_info_orange {
background-image: linear-gradient(to bottom, #F5793A, orange);
}
.lotw_info_red {
background-image: linear-gradient(to bottom, #F5793A, #A95AA1);
}
path.grid-rectangle {
stroke: rgba(97, 97, 97, 1);
}
span.grid-text > font {
color: rgb(97, 97, 97) !important;
font-weight: 400 !important;
}
span.grid-text-unworked > font {
color: rgb(97, 97, 97) !important;
font-weight: 400 !important;
}
span.grid-text-worked > font {
color: rgb(255, 255, 255) !important;
font-weight: 400 !important;
}

View File

@@ -101,16 +101,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
::-webkit-scrollbar {
width: 12px;
}

View File

@@ -153,13 +153,3 @@ span.grid-text-worked > font {
color: rgb(255, 255, 255) !important;
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}

View File

@@ -53,16 +53,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
.map-leaflet {
background-color: #2d3537!important;
}

View File

@@ -53,16 +53,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
.map-leaflet {
background-color: #2d3537!important;
}

View File

@@ -70,15 +70,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
.map-leaflet {
background-color: #343d3f!important;

View File

@@ -70,16 +70,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
.map-leaflet {
background-color: #343d3f!important;
}

View File

@@ -95,14 +95,4 @@ span.grid-text-unworked > font {
span.grid-text-worked > font {
color: rgb(255, 255, 255) !important;
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}

View File

@@ -131,13 +131,3 @@ span.grid-text-worked > font {
color: rgb(255, 255, 255) !important;
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}

View File

@@ -60,16 +60,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
.map-leaflet {
background-color: #353c4a!important;
}

View File

@@ -71,16 +71,6 @@ span.grid-text-worked > font {
font-weight: 400 !important;
}
path.grid-confirmed {
fill: rgba(20, 109, 20, 0.7) !important;
stroke: rgba(20, 255, 144, 0.7) !important;
}
path.grid-worked {
fill: rgba(172, 40, 40, 0.7) !important;
stroke: rgba(248, 96, 129, 0.7) !important;
}
.map-leaflet {
background-color: #353c4a!important;
}

View File

@@ -5,10 +5,17 @@
L.Maidenhead = L.LayerGroup.extend({
options: {
// Line and label color
color: 'rgba(255, 0, 0, 0.4)',
linecolor: isDarkModeTheme() ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.3)',
color: isDarkModeTheme() ? 'rgba(255, 255, 255, 1)' : 'rgba(0, 0, 0, 1)',
workedColor: user_map_custom?.qso?.color
? hexToRgba(user_map_custom.qso.color, 0.5)
: 'rgba(255, 0, 0, 0.5)',
confirmedColor: user_map_custom?.qsoconfirm?.color
? hexToRgba(user_map_custom.qsoconfirm.color, 0.5)
: 'rgba(144,238,144, 0.5)',
// Redraw on move or moveend
redraw: 'move'
},
@@ -71,10 +78,10 @@ L.Maidenhead = L.LayerGroup.extend({
if(grid_two.includes(locator) || grid_four.includes(locator) || grid_six.includes(locator)) {
if(grid_two_confirmed.includes(locator) || grid_four_confirmed.includes(locator) || grid_six_confirmed.includes(locator)) {
var rectConfirmed = L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed', color: 'rgba(144,238,144, 0.6)', weight: 1, fillOpacity: 1, fill:true, interactive: false});
var rectConfirmed = L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed', color: this.options.confirmedColor, weight: 1, fillOpacity: 1, fill:true, interactive: false});
this.addLayer(rectConfirmed);
} else {
var rectWorked = L.rectangle(bounds, {className: 'grid-rectangle grid-worked', color: this.options.color, weight: 1, fillOpacity: 1, fill:true, interactive: false})
var rectWorked = L.rectangle(bounds, {className: 'grid-rectangle grid-worked', color: this.options.workedColor, weight: 1, fillOpacity: 1, fill:true, interactive: false});
this.addLayer(rectWorked);
}
// Controls text on grid on various zoom levels
@@ -86,7 +93,7 @@ L.Maidenhead = L.LayerGroup.extend({
}
} else {
if (grids.includes(locator) && grids !== '') {
var rect = L.rectangle(bounds, {className: 'grid-rectangle grid-unworked', color: 'rgba(0,0,0, 0.3)', weight: 1, fillOpacity: 0.15, fill:true, interactive: false});
var rect = L.rectangle(bounds, {className: 'grid-rectangle grid-unworked', color: this.options.linecolor, weight: 1, fillOpacity: 0.15, fill:true, interactive: false});
this.addLayer(rect);
this.addLayer(this._getLabel(lon+unit-(unit/lcor),lat+(unit/2)+(unit/lcor*c)));
}

View File

@@ -6,8 +6,19 @@ L.Maidenhead = L.LayerGroup.extend({
options: {
// Line and label color
color: 'rgba(255, 0, 0, 0.4)',
linecolor: isDarkModeTheme() ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)',
color: isDarkModeTheme() ? 'rgba(255, 255, 255, 1)' : 'rgba(0, 0, 0, 1)',
workedColor: user_map_custom?.qso?.color
? hexToRgba(user_map_custom.qso.color, 0.5)
: 'rgba(255, 251, 0, 0.5)',
confirmedColor: user_map_custom?.qsoconfirm?.color
? hexToRgba(user_map_custom.qsoconfirm.color, 0.5)
: 'rgba(144,238,144, 0.5)',
unworkedColor : user_map_custom?.unworked?.color
? hexToRgba(user_map_custom.unworked.color, 0.5)
: 'rgba(255, 0, 0, 0.5)',
// Redraw on move or moveend
redraw: 'move'
@@ -67,13 +78,13 @@ L.Maidenhead = L.LayerGroup.extend({
if(grid_four.includes(locator)) {
if(grid_four_lotw.includes(locator)) {
var rectConfirmed = L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed', color: 'rgba(144,238,144, 0.6)', weight: 1, fillOpacity: 1, fill:true, interactive: false});
var rectConfirmed = L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed', color: this.options.confirmedColor, weight: 1, fillOpacity: 1, fill:true, interactive: false});
this.addLayer(rectConfirmed);
} else if (grid_four_paper.includes(locator)) {
var rectPaper = L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed', color: 'rgba(0,176,240, 0.6)', weight: 1, fillOpacity: 1, fill:true, interactive: false});
var rectPaper = L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed-paper', color: this.options.workedColor, weight: 1, fillOpacity: 1, fill:true, interactive: false});
this.addLayer(rectPaper);
} else {
var rectWorked = L.rectangle(bounds, {className: 'grid-rectangle grid-worked', color: 'rgba(255,215,87, 0.6)', weight: 1, fillOpacity: 1, fill:true, interactive: false})
var rectWorked = L.rectangle(bounds, {className: 'grid-rectangle grid-unworked', color: this.options.unworkedColor, weight: 1, fillOpacity: 1, fill:true, interactive: false})
this.addLayer(rectWorked);
}
// Controls text on grid on various zoom levels

View File

@@ -1377,6 +1377,24 @@ function showToast(title, text, type = 'bg-success text-white', delay = 3000) {
toastEl.addEventListener('hidden.bs.toast', () => toastEl.remove());
}
function hexToRgba(hex, alpha = 1) {
if (!hex) return null;
// Remove the leading "#"
hex = hex.replace(/^#/, '');
// Expand short form (#f0a → #ff00aa)
if (hex.length === 3) {
hex = hex.split('').map(c => c + c).join('');
}
const num = parseInt(hex, 16);
const r = (num >> 16) & 255;
const g = (num >> 8) & 255;
const b = num & 255;
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
}
/**
* Cookie Management Utilities
*/

View File

@@ -4,6 +4,15 @@ var geojson;
var map;
var info;
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
function load_cq_map() {
$('.nav-tabs a[href="#cqmaptab"]').tab('show');
$.ajax({
@@ -61,15 +70,15 @@ function load_cq_map2(data) {
var workednotconfirmed = 0;
for (var i = 0; i < cqzonenames.length; i++) {
var mapColor = 'red';
var mapColor = unworkedColor;
if (data[i] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
confirmed++;
notworked--;
}
if (data[i] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
workednotconfirmed++;
notworked--;
}
@@ -94,9 +103,9 @@ function load_cq_map2(data) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
div.innerHTML += "<i style='background: "+confirmedColor+"'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: "+workedColor+"'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: "+unworkedColor+"'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
@@ -123,9 +132,9 @@ function load_cq_map2(data) {
}
function getColor(d) {
return cqz[d-1] == 'C' ? 'green' :
cqz[d-1] == 'W' ? 'orange' :
'red';
return cqz[d-1] == 'C' ? confirmedColor :
cqz[d-1] == 'W' ? workedColor :
unworkedColor;
}
function highlightFeature(e) {

View File

@@ -1,3 +1,12 @@
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('.dropdown').forEach(dd => {
dd.addEventListener('hide.bs.dropdown', function (e) {
@@ -110,21 +119,21 @@ function load_dxcc_map2(data, worked, confirmed, notworked) {
var mapColor = 'red';
if (D['status'] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
if (confirmed != '0') {
addMarker(L, D, mapColor, map);
confirmedcount++;
}
}
if (D['status'] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
if (worked != '0') {
addMarker(L, D, mapColor, map);
workednotconfirmedcount++;
}
}
if (D['status'] == '-') {
mapColor = 'red';
mapColor = unworkedColor;
if (notworked != '0') {
addMarker(L, D, mapColor, map);
notworkedcount++;
@@ -143,9 +152,9 @@ function load_dxcc_map2(data, worked, confirmed, notworked) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>Colors</h4>";
div.innerHTML += '<i style="background: green"></i><span>' + lang_general_word_confirmed + ' ('+confirmedcount+')</span><br>';
div.innerHTML += '<i style="background: orange"></i><span>' + lang_general_word_worked_not_confirmed + ' ('+workednotconfirmedcount+')</span><br>';
div.innerHTML += '<i style="background: red"></i><span>' + lang_general_word_not_worked + ' ('+notworkedcount+')</span><br>';
div.innerHTML += '<i style="background: ' + confirmedColor + '"></i><span>' + lang_general_word_confirmed + ' ('+confirmedcount+')</span><br>';
div.innerHTML += '<i style="background: ' + workedColor + '"></i><span>' + lang_general_word_worked_not_confirmed + ' ('+workednotconfirmedcount+')</span><br>';
div.innerHTML += '<i style="background: ' + unworkedColor + '"></i><span>' + lang_general_word_not_worked + ' ('+notworkedcount+')</span><br>';
return div;
};

View File

@@ -1,7 +1,16 @@
var map;
var grid_four = '';
var grid_four_lotw = '';
var grid_four_paper = '';
let map;
let grid_four = '';
let grid_four_lotw = '';
let grid_four_paper = '';
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
function gridPlot(form) {
$(".ld-ext-right-plot").addClass('running');
@@ -34,10 +43,16 @@ function gridPlot(form) {
grid_four_lotw = data.grid_4char_lotw;
grid_four_paper = data.grid_4char_paper;
paper_count = 0;
worked_count = 0;
grid_four_paper.forEach((element) => {
if (!grid_four_lotw.includes(element)) {
paper_count++;
}
});
grid_four.forEach((element) => {
if (!grid_four_lotw.includes(element) && !grid_four_paper.includes(element)) {
worked_count++;
}
});
var layer = L.tileLayer(jslayer, {
maxZoom: 12,
@@ -72,9 +87,10 @@ function gridPlot(form) {
var div = L.DomUtil.create("div", "legend");
//div.innerHTML += "<h4>" + gridsquares_gridsquares + "</h4>";
html = "<table border=\"0\">";
html += '<tr><td><i style="background: #90ee90"></i><span>' + gridsquares_gridsquares_lotw + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+grid_four_lotw.length+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: #00b0f0"></i><span>' + gridsquares_gridsquares_paper + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+paper_count+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: #ffd757"></i><span>' + gridsquares_gridsquares_worked + ' ('+(Math.round((grid_four.length / grid_max) * 10000) / 100)+'%):</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+(grid_four.length)+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: ' + confirmedColor + '"></i><span>' + gridsquares_gridsquares_lotw + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+grid_four_lotw.length+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: ' + workedColor + '"></i><span>' + gridsquares_gridsquares_paper + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+paper_count+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: ' + unworkedColor +'"></i><span>' + gridsquares_gridsquares_worked +'</span></td><td style=\"padding-left: 1em; text-align: right;\"><span> '+worked_count+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i></i><span>' + gridsquares_gridsquares_worked + ' ('+(Math.round((grid_four.length / grid_max) * 10000) / 100)+'%):</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+(grid_four.length)+' / '+grid_max+'</span></td></tr>';
html += "</table>";
div.innerHTML = html;
return div;

View File

@@ -1,5 +1,10 @@
var modalloading=false;
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
console.log("Confirmed color: " + confirmedColor);
console.log("Worked color: " + workedColor);
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('.dropdown').forEach(dd => {
dd.addEventListener('hide.bs.dropdown', function (e) {
@@ -183,12 +188,12 @@ function plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_f
div.setAttribute('id', 'gridmapLegend');
div.innerHTML += '<div align="right" class="legendClose"><small><a href="javascript: hideLegend();">X</a></small></div>';
div.innerHTML += "<h4>" + gridsquares_gridsquares + "</h4>";
div.innerHTML += '<i style="background: green"></i><span>' + gridsquares_gridsquares_confirmed + ' ('+grid_four_confirmed.length+')</span><br>';
div.innerHTML += '<i style="background: red"></i><span>' + gridsquares_gridsquares_not_confirmed + ' ('+(grid_four.length - grid_four_confirmed.length)+')</span><br>';
div.innerHTML += '<i class="grid-confirmed" style="background: ' + confirmedColor + '"></i><span>' + gridsquares_gridsquares_confirmed + ' ('+grid_four_confirmed.length+')</span><br>';
div.innerHTML += '<i class="grid-worked" style="background: ' + workedColor + '"></i><span>' + gridsquares_gridsquares_not_confirmed + ' ('+(grid_four.length - grid_four_confirmed.length)+')</span><br>';
div.innerHTML += '<i></i><span>' + gridsquares_gridsquares_total_worked + ' ('+grid_four.length+')</span><br>';
div.innerHTML += "<h4>Fields</h4>";
div.innerHTML += '<i style="background: green"></i><span>Fields confirmed ('+grid_two_confirmed.length+')</span><br>';
div.innerHTML += '<i style="background: red"></i><span>Fields not confirmed ('+(grid_two.length - grid_two_confirmed.length)+')</span><br>';
div.innerHTML += '<i class="grid-confirmed" style="background: ' + confirmedColor + '"></i><span>Fields confirmed ('+grid_two_confirmed.length+')</span><br>';
div.innerHTML += '<i class="grid-worked" style="background: ' + workedColor + '"></i><span>Fields not confirmed ('+(grid_two.length - grid_two_confirmed.length)+')</span><br>';
div.innerHTML += '<i></i><span>Total fields worked ('+grid_two.length+')</span><br>';
return div;
};

View File

@@ -1,7 +1,16 @@
var map;
var grid_four = '';
var grid_four_lotw = '';
var grid_four_paper = '';
let map;
let grid_four = '';
let grid_four_lotw = '';
let grid_four_paper = '';
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
function gridPlot(form, dxcc) {
$(".ld-ext-right-plot").addClass('running');
@@ -41,11 +50,17 @@ function gridPlot(form, dxcc) {
lon = data.lon;
zoom = data.zoom;
paper_count = 0;
worked_count = 0;
grid_four_paper.forEach((element) => {
if (!grid_four_lotw.includes(element)) {
paper_count++;
}
});
grid_four.forEach((element) => {
if (!grid_four_lotw.includes(element) && !grid_four_paper.includes(element)) {
worked_count++;
}
});
var layer = L.tileLayer(jslayer, {
maxZoom: 12,
attribution: jsattribution,
@@ -78,9 +93,10 @@ function gridPlot(form, dxcc) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
html = "<table border=\"0\">";
html += '<tr><td><i style="background: #90ee90"></i><span>' + gridsquares_gridsquares_lotw + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+grid_four_lotw.length+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: #00b0f0"></i><span>' + gridsquares_gridsquares_paper + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+paper_count+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: #ffd757"></i><span>' + gridsquares_gridsquares_worked + ' ('+(Math.round((grid_four.length / grid_max) * 10000) / 100)+'%):</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+(grid_four.length)+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: '+ confirmedColor +'"></i><span>' + gridsquares_gridsquares_lotw + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+grid_four_lotw.length+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: '+ workedColor +'"></i><span>' + gridsquares_gridsquares_paper + ':</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+paper_count+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i style="background: '+ unworkedColor +'"></i><span>' + gridsquares_gridsquares_worked +'</span></td><td style=\"padding-left: 1em; text-align: right;\"><span> '+worked_count+' / '+grid_max+'</span></td></tr>';
html += '<tr><td><i></i><span>' + gridsquares_gridsquares_worked + ' ('+(Math.round((grid_four.length / grid_max) * 10000) / 100)+'%):</span></td><td style=\"padding-left: 1em; text-align: right;\"><span>'+(grid_four.length)+' / '+grid_max+'</span></td></tr>';
html += "</table>";
div.innerHTML = html;
return div;

View File

@@ -1,9 +1,18 @@
var osmUrl = tileUrl;
var province;
var geojson;
var map;
var info;
var clickmarkers = [];
let osmUrl = tileUrl;
let province;
let geojson;
let map;
let info;
let clickmarkers = [];
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
const states = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH';
@@ -66,15 +75,15 @@ function load_helvetia_map2(data) {
var workednotconfirmed = 0;
for(var k in data) {
var mapColor = 'red';
var mapColor = unworkedColor;
if (data[k] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
confirmed++;
notworked--;
}
if (data[k] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
workednotconfirmed++;
notworked--;
}
@@ -87,9 +96,9 @@ function load_helvetia_map2(data) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + unworkedColor + "'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
@@ -143,9 +152,9 @@ function createMarker(i) {
}
function getColor(d) {
return province[d] == 'C' ? 'green' :
province[d] == 'W' ? 'orange' :
'red';
return province[d] == 'C' ? confirmedColor :
province[d] == 'W' ? workedColor :
unworkedColor;
}
function highlightFeature(e) {

View File

@@ -1,3 +1,12 @@
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
var osmUrl = $('#iotamapjs').attr("tileUrl");
function load_iota_map() {
@@ -29,7 +38,7 @@ function load_iota_map() {
load_iota_map2(data, +$('#worked').prop('checked'), +$('#confirmed').prop('checked'), +$('#notworked').prop('checked'));
},
error: function() {
},
});
}
@@ -67,10 +76,10 @@ function load_iota_map2(data, worked, confirmed, notworked) {
for (var i = 0; i < data.length; i++) {
var D = data[i];
if (D['status'] != 'x') {
var mapColor = 'red';
var mapColor = unworkedColor;
if (D['status'] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
if (confirmed != '0') {
addPolygon(L, D, mapColor, map);
addMarker(L, D, mapColor, map);
@@ -79,7 +88,7 @@ function load_iota_map2(data, worked, confirmed, notworked) {
}
}
if (D['status'] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
if (worked != '0') {
addPolygon(L, D, mapColor, map);
addMarker(L, D, mapColor, map);
@@ -87,11 +96,11 @@ function load_iota_map2(data, worked, confirmed, notworked) {
notworkedcount--;
}
}
// Make a check here and hide what I don't want to show
if (notworked != '0') {
if (mapColor == 'red') {
if (mapColor == unworkedColor) {
addPolygon(L, D, mapColor, map);
addMarker(L, D, mapColor, map);
}
@@ -109,9 +118,9 @@ function load_iota_map2(data, worked, confirmed, notworked) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>Colors</h4>";
div.innerHTML += '<i style="background: green"></i><span>' + lang_general_word_confirmed + ' ('+confirmedcount+')</span><br>';
div.innerHTML += '<i style="background: orange"></i><span>' + lang_general_word_worked_not_confirmed + ' ('+workednotconfirmedcount+')</span><br>';
div.innerHTML += '<i style="background: red"></i><span>' + lang_general_word_not_worked + ' ('+notworkedcount+')</span><br>';
div.innerHTML += '<i style="background: ' + confirmedColor + '"></i><span>' + lang_general_word_confirmed + ' ('+confirmedcount+')</span><br>';
div.innerHTML += '<i style="background: ' + workedColor + '"></i><span>' + lang_general_word_worked_not_confirmed + ' ('+workednotconfirmedcount+')</span><br>';
div.innerHTML += '<i style="background: ' + unworkedColor + '"></i><span>' + lang_general_word_not_worked + ' ('+notworkedcount+')</span><br>';
return div;
};
@@ -131,14 +140,14 @@ function addPolygon(L, D, mapColor, map) {
if (D['tag'] != 'AN-016') {
if (D['lon1'] > 0 && D['lon2'] < 0 && D['lon1'] - D['lon2'] > 180) {
D['lon2'] = parseFloat(D['lon2'])+360;
}
if (D['lon1'] < 0 && D['lon2'] > 0 && D['lon2'] - D['lon1'] > 180) {
D['lon1'] = parseFloat(D['lon1'])+360;
}
}
// It seems to me that latitudes have the wrong sign to be drawn correctly in leaflet. That's why they are mulitipled with -1 to be drawn in the correct hemisphere.
var latlngs = [
[D['lat1']*-1, D['lon1']],
@@ -153,8 +162,8 @@ function addPolygon(L, D, mapColor, map) {
function addMarker(L, D, mapColor, map) {
var title = '<span><font style="color: ' +mapColor+ '; text-shadow: 1px 0 #fff, -1px 0 #fff, 0 1px #fff, 0 -1px #fff, 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;font-size: 14px; font-weight: 900;">' + D['tag'] + '</font></span>';
var myIcon = L.divIcon({
className: 'my-div-icon',
html: title,
className: 'my-div-icon',
html: title,
iconSize: [60, 10]
});

View File

@@ -1,8 +1,17 @@
var osmUrl = tileUrl;
var ituz;
var geojson;
var map;
var info;
let osmUrl = tileUrl;
let ituz;
let geojson;
let map;
let info;
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
function load_itu_map() {
$('.nav-tabs a[href="#itumaptab"]').tab('show');
@@ -154,15 +163,15 @@ function load_itu_map2(data) {
var workednotconfirmed = 0;
for (var i = 0; i < zonemarkers.length; i++) {
var mapColor = 'red';
var mapColor = unworkedColor ;
if (data[i] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
confirmed++;
notworked--;
}
if (data[i] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
workednotconfirmed++;
notworked--;
}
@@ -187,9 +196,9 @@ function load_itu_map2(data) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + unworkedColor + "'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
@@ -215,9 +224,9 @@ function load_itu_map2(data) {
}
function getColor(d) {
return ituz[d-1] == 'C' ? 'green' :
ituz[d-1] == 'W' ? 'orange' :
'red';
return ituz[d-1] == 'C' ? confirmedColor :
ituz[d-1] == 'W' ? workedColor :
unworkedColor;
}
function highlightFeature(e) {

View File

@@ -1,4 +1,12 @@
var osmUrl = tileUrl;
let osmUrl = tileUrl;
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
function load_jcc_map() {
$('.nav-tabs a[href="#jccmaptab"]').tab('show');
@@ -73,7 +81,7 @@ function load_jcc_map2(data, worked, confirmed, notworked) {
if (key in data) {
if (confirmed.checked == true) {
if (data[key][1] == 1) {
mapColor = 'green';
mapColor = confirmedColor;
D['prefix'] = key;
D['name'] = value[0];
D['lat'] = value[1];
@@ -84,7 +92,7 @@ function load_jcc_map2(data, worked, confirmed, notworked) {
}
}
if (worked.checked == true) {
mapColor = 'orange';
mapColor = workedColor;
D['prefix'] = key;
D['name'] = value[0];
D['lat'] = value[1];
@@ -94,7 +102,7 @@ function load_jcc_map2(data, worked, confirmed, notworked) {
}
} else {
if (notworked.checked == true) {
mapColor = 'red';
mapColor = unworkedColor;
D['prefix'] = key;
D['name'] = value[0];
D['lat'] = value[1];
@@ -111,9 +119,9 @@ function load_jcc_map2(data, worked, confirmed, notworked) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmedcount + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmedcount + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworkedcount + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmedcount + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmedcount + ")</span><br>";
div.innerHTML += "<i style='background: " + unworkedColor + "'></i><span>" + lang_general_word_not_worked + " (" + notworkedcount + ")</span><br>";
return div;
};

View File

@@ -1,9 +1,18 @@
var osmUrl = tileUrl;
var province;
var geojson;
var map;
var info;
var clickmarkers = [];
let osmUrl = tileUrl;
let province;
let geojson;
let map;
let info;
let clickmarkers = [];
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
const states = 'AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT';
@@ -83,15 +92,15 @@ function load_rac_map2(data) {
var workednotconfirmed = 0;
for(var k in data) {
var mapColor = 'red';
var mapColor = unworkedColor;
if (data[k] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
confirmed++;
notworked--;
}
if (data[k] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
workednotconfirmed++;
notworked--;
}
@@ -104,9 +113,9 @@ function load_rac_map2(data) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + unworkedColor + "'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
@@ -171,9 +180,9 @@ function createMarker(i) {
}
function getColor(d) {
return province[d] == 'C' ? 'green' :
province[d] == 'W' ? 'orange' :
'red';
return province[d] == 'C' ? confirmedColor :
province[d] == 'W' ? workedColor :
unworkedColor;
}
function highlightFeature(e) {

View File

@@ -1,3 +1,12 @@
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
$('#band').change(function(){
var band = $("#band option:selected").text();
if (band != "SAT") {
@@ -139,7 +148,7 @@ function wabmap(data) {
if (data[feature.properties.name] == 'C') {
confirmedcount++;
return {
fillColor: 'green',
fillColor: confirmedColor,
fill: true,
fillOpacity: 0.8,
className: 'confirmed-square'
@@ -148,7 +157,7 @@ function wabmap(data) {
if (data[feature.properties.name] == 'W') {
workedcount++;
return {
fillColor: 'orange',
fillColor: workedColor,
fill: true,
fillOpacity: 0.8,
className: 'worked-square'
@@ -233,8 +242,8 @@ function wabmap(data) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmedcount + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workedcount + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmedcount + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workedcount + ")</span><br>";
return div;
};

View File

@@ -1,9 +1,18 @@
var osmUrl = tileUrl;
var prefectures;
var geojson;
var map;
var info;
var clickmarkers = [];
let osmUrl = tileUrl;
let prefectures;
let geojson;
let map;
let info;
let clickmarkers = [];
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
const states = '01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47';
@@ -167,15 +176,15 @@ const mapcoordinates = { "type": "FeatureCollection", "features": [
var workednotconfirmed = 0;
for(var k in data) {
var mapColor = 'red';
var mapColor = unworkedColor;
if (data[k] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
confirmed++;
notworked--;
}
if (data[k] == 'W') {
mapColor = 'orange';
mapColor = workedColor;
workednotconfirmed++;
notworked--;
}
@@ -188,9 +197,9 @@ const mapcoordinates = { "type": "FeatureCollection", "features": [
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + unworkedColor + "'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
@@ -257,9 +266,9 @@ function createMarker(i) {
function getColor(d) {
var res = d.replace(/\D/g,'');
return prefectures[res] == 'C' ? 'green' :
prefectures[res] == 'W' ? 'orange' :
'red';
return prefectures[res] == 'C' ? confirmedColor :
prefectures[res] == 'W' ? workedColor :
unworkedColor;
}
function highlightFeature(e) {

View File

@@ -1,9 +1,18 @@
var osmUrl = tileUrl;
var was;
var geojson;
var map;
var info;
var clickmarkers = [];
let osmUrl = tileUrl;
let was;
let geojson;
let map;
let info;
let clickmarkers = [];
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
}
const states = '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';
@@ -174,15 +183,15 @@ const mapcoordinates = { "type": "FeatureCollection", "features": [
var workednotconfirmed = 0;
for(var k in data) {
var mapColor = 'red';
var mapColor = unworkedColor;
if (data[k] == 'C') {
mapColor = 'green';
mapColor = confirmedColor;
confirmed++;
notworked--;
}
if (data[k] == 'W') {
mapColor = 'orange';
mapColor = unworkedColor;
workednotconfirmed++;
notworked--;
}
@@ -208,9 +217,9 @@ const mapcoordinates = { "type": "FeatureCollection", "features": [
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
div.innerHTML += "<i style='background: " + confirmedColor + "'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + workedColor + "'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: " + unworkedColor + "'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
@@ -284,9 +293,9 @@ function createMarker(i) {
function getColor(d) {
var res = d.substring(3, 5);
return was[res] == 'C' ? 'green' :
was[res] == 'W' ? 'orange' :
'red';
return was[res] == 'C' ? confirmedColor :
was[res] == 'W' ? workedColor :
unworkedColor;
}
function highlightFeature(e) {