diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index bcbf4542..78466e29 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -3275,6 +3275,44 @@ function lotw_last_qsl_date($user_id) {
$cq_zone = NULL;
}
+ // Sanitise gridsquare input to make sure its a gridsquare
+ if (isset($record['gridsquare'])){
+ $a_grids=explode(',',$record['gridsquare']); // Split at , if there are junctions
+ foreach ($a_grids as $singlegrid) {
+ $singlegrid=strtoupper($singlegrid);
+ if (strlen($singlegrid) == 4) $singlegrid .= "LL"; // Only 4 Chars? Fill with center "LL" as only A-R allowed
+ if (strlen($singlegrid) == 6) $singlegrid .= "55"; // Only 6 Chars? Fill with center "55"
+ if (strlen($singlegrid) == 8) $singlegrid .= "LL"; // Only 8 Chars? Fill with center "LL" as only A-R allowed
+ if (strlen($singlegrid)%2 != 0) { // Check if grid is structually valid
+ $record['gridsquare']=''; // If not: Set to ''
+ } else {
+ if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}[0-9]{2}[A-X]{2}$/', $singlegrid)) $record['gridsquare']='';
+ }
+ }
+ $input_gridsquare = $record['gridsquare'];
+ } else {
+ $input_gridsquare = NULL;
+ }
+
+ // Sanitise vucc-gridsquare input to make sure its a gridsquare
+ if (isset($record['vucc_grids'])){
+ $a_grids=explode(',',$record['vucc_grids']); // Split at , if there are junctions
+ foreach ($a_grids as $singlegrid) {
+ $singlegrid=strtoupper($singlegrid);
+ if (strlen($singlegrid) == 4) $singlegrid .= "LL"; // Only 4 Chars? Fill with center "LL" as only A-R allowed
+ if (strlen($singlegrid) == 6) $singlegrid .= "55"; // Only 6 Chars? Fill with center "55"
+ if (strlen($singlegrid) == 8) $singlegrid .= "LL"; // Only 8 Chars? Fill with center "LL" as only A-R allowed
+ if (strlen($singlegrid)%2 != 0) { // Check if grid is structually valid
+ $record['vucc_grids']=''; // If not: Set to ''
+ } else {
+ if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}[0-9]{2}[A-X]{2}$/', $singlegrid)) $record['vucc_grids']='';
+ }
+ }
+ $input_vucc_grids = $record['vucc_grids'];
+ } else {
+ $input_vucc_grids = NULL;
+ }
+
// Sanitise lat input to make sure its 11 chars
if (isset($record['lat'])){
$input_lat = mb_strimwidth($record['lat'], 0, 11);
@@ -3540,7 +3578,7 @@ function lotw_last_qsl_date($user_id) {
'COL_FORCE_INIT' => (!empty($record['force_init'])) ? $record['force_init'] : null,
'COL_FREQ' => $freq,
'COL_FREQ_RX' => (!empty($record['freq_rx'])) ? $freqRX : null,
- 'COL_GRIDSQUARE' => (!empty($record['gridsquare'])) ? $record['gridsquare'] : '',
+ 'COL_GRIDSQUARE' => $input_gridsquare,
'COL_HEADING' => (!empty($record['heading'])) ? $record['heading'] : null,
'COL_HRDLOG_QSO_UPLOAD_DATE' => (!empty($record['hrdlog_qso_upload_date'])) ? $record['hrdlog_qso_upload_date'] : null,
'COL_HRDLOG_QSO_UPLOAD_STATUS' => (!empty($record['hrdlog_qso_upload_status'])) ? $record['hrdlog_qso_upload_status'] : '',
@@ -3654,7 +3692,7 @@ function lotw_last_qsl_date($user_id) {
'COL_TX_PWR' => (!empty($tx_pwr)) ? $tx_pwr : null,
'COL_UKSMG' => (!empty($record['uksmg'])) ? $record['uksmg'] : '',
'COL_USACA_COUNTIES' => (!empty($record['usaca_counties'])) ? $record['usaca_counties'] : '',
- 'COL_VUCC_GRIDS' =>((!empty($record['vucc_grids']))) ? $record['vucc_grids'] : '',
+ 'COL_VUCC_GRIDS' => $input_vucc_grids,
'COL_WEB' => (!empty($record['web'])) ? $record['web'] : ''
);
diff --git a/application/views/awards/details.php b/application/views/awards/details.php
index 59261177..f656d527 100644
--- a/application/views/awards/details.php
+++ b/application/views/awards/details.php
@@ -1,3 +1,3 @@
-
+
-load->view('view_log/partial/log_ajax') ?>
\ No newline at end of file
+load->view('view_log/partial/log_ajax'); ?>
\ No newline at end of file
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php
index 021e7106..624464a5 100644
--- a/application/views/interface_assets/footer.php
+++ b/application/views/interface_assets/footer.php
@@ -532,6 +532,9 @@ $(function () {
$(".searchbutton").removeClass('running');
$(".searchbutton").prop('disabled', false);
$("#btn-save").show();
+ $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () {
+ showQsoActionsMenu($(this).closest('.dropdown'));
+ });
});
} else {
BootstrapDialog.show({
@@ -817,37 +820,6 @@ function showActivatorsMap(call, count, grids) {
$(function () {
$('[data-bs-toggle="tooltip"]').tooltip()
});
-
- $(function () {
- // hold onto the drop down menu
- var dropdownMenu;
-
- // and when you show it, move it to the body
- $(window).on('show.bs.dropdown', function (e) {
-
- // grab the menu
- dropdownMenu = $(e.target).find('.dropdown-menu');
-
- // detach it and append it to the body
- $('body').append(dropdownMenu.detach());
-
- // grab the new offset position
- var eOffset = $(e.target).offset();
-
- // make sure to place it where it would normally go (this could be improved)
- dropdownMenu.css({
- 'display': 'block',
- 'top': eOffset.top + $(e.target).outerHeight(),
- 'left': eOffset.left
- });
- });
-
- // and when you hide it, reattach the drop down, and hide it normally
- $(window).on('hide.bs.dropdown', function (e) {
- $(e.target).append(dropdownMenu.detach());
- dropdownMenu.hide();
- });
- });
uri->segment(1) == "search") { ?>
@@ -1642,6 +1614,9 @@ $(document).ready(function(){
$('#exampleModal').modal('show');
$('[data-bs-toggle="tooltip"]').tooltip({ boundary: 'window' });
}
+ $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () {
+ showQsoActionsMenu($(this).closest('.dropdown'));
+ });
}
});
}
@@ -1776,6 +1751,9 @@ $(document).ready(function(){
$('#exampleModal').modal('show');
$('[data-bs-toggle="tooltip"]').tooltip({ boundary: 'window' });
}
+ $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () {
+ showQsoActionsMenu($(this).closest('.dropdown'));
+ });
}
});
@@ -2185,6 +2163,9 @@ $(document).ready(function(){
message: html,
onshown: function(dialog) {
$('[data-bs-toggle="tooltip"]').tooltip();
+ $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () {
+ showQsoActionsMenu($(this).closest('.dropdown'));
+ });
},
buttons: [{
label: lang_admin_close,
@@ -2491,6 +2472,9 @@ function viewEqsl(picture, callsign) {
'csv'
]
});
+ $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () {
+ showQsoActionsMenu($(this).closest('.dropdown'));
+ });
},
buttons: [{
label: lang_admin_close,
@@ -2513,7 +2497,7 @@ function viewEqsl(picture, callsign) {
'Mode': mode,
'Type': type,
'QSL' : qsl
- },
+ },
success: function (html) {
var dialog = new BootstrapDialog({
title: lang_general_word_qso_data,
@@ -2536,6 +2520,9 @@ function viewEqsl(picture, callsign) {
'csv'
]
});
+ $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () {
+ showQsoActionsMenu($(this).closest('.dropdown'));
+ });
},
buttons: [{
label: lang_admin_close,
diff --git a/application/views/search/search_result_ajax.php b/application/views/search/search_result_ajax.php
index f26870bb..16c94bfb 100644
--- a/application/views/search/search_result_ajax.php
+++ b/application/views/search/search_result_ajax.php
@@ -419,7 +419,7 @@ $ci =& get_instance();
-