by the way fixing the last dxspot feature and make the UX more logic (was killing the qso form if the button was hit accidentially

This commit is contained in:
HB9HIL
2026-02-03 21:14:31 +01:00
parent 83a6677431
commit 892dfbf97f
2 changed files with 21 additions and 7 deletions

View File

@@ -42,6 +42,9 @@ switch ($date_format) {
var lang_qso_sat_lotw_support_not_found = "<?= __("Satellite not found"); ?>";
var lang_qso_sat_lotw_supported = "<?= __("Supported by LoTW"); ?>";
var lang_qso_sat_lotw_not_supported = "<?= __("Not supported by LoTW"); ?>";
var lang_general_word_info = "<?= __("Info"); ?>";
var lang_qso_you_already_filled_an_qso = "<?= __("You have already filled in a callsign. First finish this QSO before filling the last spot from DXcluster."); ?>";
var lang_qso_no_spots_found = "<?= __("No spots found in this frequency.") ?>";
</script>
<!--- DX Waterfall --->

View File

@@ -281,13 +281,24 @@ $('#locator').on('input', function () {
});
$("#check_cluster").on("click", function () {
$.ajax({ url: dxcluster_provider + "/qrg_lookup/" + $("#frequency").val() / 1000, cache: false, dataType: "json" }).done(
function (dxspot) {
reset_fields();
$("#callsign").val(dxspot.spotted);
$("#callsign").trigger("blur");
}
);
if ($("#callsign").val().trim() == '') {
$.ajax({
url: dxcluster_provider + "/qrg_lookup/" + $("#frequency").val() / 1000,
cache: false,
dataType: "json",
success: function (dxspot) {
if ((dxspot.spotted ?? '') != '') {
reset_fields();
$("#callsign").val(dxspot.spotted);
$("#callsign").trigger("blur");
} else {
showToast(lang_general_word_info, lang_qso_no_spots_found, 'bg-info text-dark', 2000);
}
}
});
} else {
showToast(lang_general_word_info, lang_qso_you_already_filled_an_qso, 'bg-info text-dark', 2000);
}
});
function set_timers() {