diff --git a/application/views/qso/index.php b/application/views/qso/index.php
index 4a19d5e70..a1e14c15e 100644
--- a/application/views/qso/index.php
+++ b/application/views/qso/index.php
@@ -5,6 +5,8 @@
var lang_qso_title_previous_contacts = "= __("Previous Contacts"); ?>";
var lang_qso_title_times_worked_before = "= __("times worked before"); ?>";
var lang_qso_title_not_worked_before = "= __("Not worked before"); ?>";
+ var lang_qso_more = "= __("more"); ?>";
+ var lang_qso_less = "= __("less"); ?>";
var lang_dxccsummary_for = "= __("DXCC Summary for "); ?>";
var lang_lotw_upload_day_ago = "= __("LoTW User. Last upload was 1 day ago."); ?>";
var lang_lotw_upload_days_ago = "= __("LoTW User. Last upload was %x days ago."); ?>"; // due to the way the string is built (PHP to JS), %x is replaced with the number of days
diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js
index 93bab0184..caeb11a60 100644
--- a/assets/js/sections/qso.js
+++ b/assets/js/sections/qso.js
@@ -825,13 +825,37 @@ $("#callsign").on("focusout", function () {
$.getJSON(base_url + 'index.php/lookup/ham_of_note/' + $('#callsign').val().toUpperCase().replaceAll('Ø', '0').replaceAll('/','-'), function (result) {
if (result) {
- $('#ham_of_note_info').text(result.description);
- $('#ham_of_note_link').html(" "+result.linkname);
- $('#ham_of_note_link').attr('href', result.link);
+ $('#ham_of_note_info').html(''+result.description+'');
+ if (result.link != null) {
+ $('#ham_of_note_link').html(" "+result.linkname);
+ $('#ham_of_note_link').attr('href', result.link);
+ }
$('#ham_of_note_line').show("slow");
+
+ var minimized_elements = $('span.minimize');
+ var maxlen = 50;
+
+ minimized_elements.each(function(){
+ var t = $(this).text();
+ if(t.length < maxlen) return;
+ $(this).html(
+ t.slice(0,maxlen)+'... '+lang_qso_more+''+ t.slice(maxlen,t.length)+' '+lang_qso_less+''
+ );
+ });
+
+ $('a.more', minimized_elements).click(function(event){
+ event.preventDefault();
+ $(this).hide().prev().hide();
+ $(this).next().show();
+ });
+
+ $('a.less', minimized_elements).click(function(event){
+ event.preventDefault();
+ $(this).parent().hide().prev().show().prev().show();
+ });
+
}
});
-
$('#dxcc_id').val(result.dxcc.adif).multiselect('refresh');
await updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
if (result.callsign_cqz != '' && (result.callsign_cqz >= 1 && result.callsign_cqz <= 40)) {