Skip to content

Commit 6fde49c

Browse files
committed
Improve popup handling
1 parent 3820888 commit 6fde49c

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

VanLiveConnect/MFD.js.ino

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ function showViewportSizes()
104104
$("#window_height").text(window.innerHeight);
105105
}
106106
107-
108107
// -----
109108
// Functions for parsing and handling VAN bus packet data as received in JSON format
110109
@@ -4022,16 +4021,16 @@ function handleItemChange(item, value, changed)
40224021
// Un-highlight any previous entry in the "tuner_presets_popup"
40234022
$('div[id^=presets_memory_][id$=_select]').hide();
40244023
4025-
// Make sure the audio settings popup is hidden
4026-
hideAudioSettingsPopup();
4027-
40284024
// Changed to a non-preset frequency? Or just changed audio source? Then suppress the tuner presets popup.
40294025
if (value === "-" || hideHeadUnitPopupsTimer !== null)
40304026
{
40314027
hideTunerPresetsPopup();
40324028
}
40334029
else
40344030
{
4031+
// Make sure the audio settings popup is hidden
4032+
hideAudioSettingsPopup();
4033+
40354034
// Highlight the corresponding entry in the "tuner_presets_popup", in case that is currently visible
40364035
// due to a recent preset button press on the head unit
40374036
let highlightId = "presets_memory_" + value + "_select";
@@ -4061,7 +4060,7 @@ function handleItemChange(item, value, changed)
40614060
40624061
tunerSearchMode = value;
40634062
4064-
hideAudioSettingsPopup();
4063+
//hideAudioSettingsPopup();
40654064
hideTunerPresetsPopup();
40664065
40674066
showAudioPopup();
@@ -5710,7 +5709,6 @@ function handleItemChange(item, value, changed)
57105709
let line_1 = value.substr(0, splitAt);
57115710
let line_2 = value.substr(splitAt);
57125711
5713-
57145712
$("#satnav_to_mfd_show_characters_line_1").text(line_1);
57155713
$("#satnav_to_mfd_show_characters_line_2").text(line_2);
57165714
@@ -5986,6 +5984,7 @@ function handleItemChange(item, value, changed)
59865984
}
59875985
else
59885986
{
5987+
hideAllPopups();
59895988
showPopup("climate_control_popup", 5000);
59905989
} // if
59915990
} // case

VanLiveConnect/data/MFD.js.gz

55 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)