Replace slashed zero for qrz.com etc. links

pull/2495/head
phl0 2023-09-18 08:22:55 +02:00
rodzic 7669781424
commit e1ebbd8e16
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
2 zmienionych plików z 10 dodań i 4 usunięć

Wyświetl plik

@ -103,6 +103,7 @@ class Logbook extends CI_Controller {
// Convert - in Callsign to / Used for URL processing
$callsign = str_replace("-","/",$callsign);
$callsign = str_replace("Ø","0",$callsign);
// Check if callsign is an LoTW User
// Check Database for all other data

Wyświetl plik

@ -506,9 +506,10 @@ $("#callsign").focusout(function() {
var find_callsign = $(this).val().toUpperCase();
find_callsign.replace(/\//g, "-");
find_callsign.replace('Ø', '0');
// Replace / in a callsign with - to stop urls breaking
$.getJSON(base_url + 'index.php/logbook/json/' + find_callsign.replace(/\//g, "-") + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result)
$.getJSON(base_url + 'index.php/logbook/json/' + find_callsign + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result)
{
// Make sure the typed callsign and json result match
@ -521,9 +522,12 @@ $("#callsign").focusout(function() {
$('#country').val(convert_case(result.dxcc.entity));
$('#callsign_info').text(convert_case(result.dxcc.entity));
var callsign = find_callsign.replace(/\//g, "-");
callsign = callsign.replace('Ø', '0');
if($("#sat_name" ).val() != "") {
//logbook/jsonlookupgrid/io77/SAT/0/0
$.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign.replace(/\//g, "-") + '/SAT/0/0', function(result)
$.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign + '/SAT/0/0', function(result)
{
// Reset CSS values before updating
$('#callsign').removeClass("workedGrid");
@ -545,7 +549,7 @@ $("#callsign").focusout(function() {
}
})
} else {
$.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign.replace(/\//g, "-") + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result)
$.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result)
{
// Reset CSS values before updating
$('#callsign').removeClass("confirmedGrid");
@ -940,11 +944,12 @@ $("#callsign").on("keypress", function(e) {
$("#callsign").keyup(function() {
if ($(this).val().length >= 3) {
$('.callsign-suggest').show();
$callsign = $(this).val().replace('Ø', '0');
$.ajax({
url: 'lookup/scp',
method: 'POST',
data: {
callsign: $(this).val().toUpperCase()
callsign: $callsign.toUpperCase()
},
success: function(result) {
$('.callsign-suggestions').text(result);