From f770c5ffd569a2d8cb722b382872494a35bedc1c Mon Sep 17 00:00:00 2001 From: Hemna Date: Fri, 15 Sep 2023 09:13:51 -0400 Subject: [PATCH] Webchat: Fixed bug deleteing first tab This patch fixes a UI issue when the user delets the first tab and the remaining tabs aren't refreshed/shown. --- aprsd/web/chat/static/js/send-message.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/aprsd/web/chat/static/js/send-message.js b/aprsd/web/chat/static/js/send-message.js index 447aa8c..e6d9515 100644 --- a/aprsd/web/chat/static/js/send-message.js +++ b/aprsd/web/chat/static/js/send-message.js @@ -68,6 +68,11 @@ function tab_string(callsign, id=false) { } } +function tab_li_string(callsign, id=false) { + //The id of the LI containing the tab + return tab_string(callsign,id)+"Li"; +} + function tab_content_name(callsign, id=false) { return tab_string(callsign, id)+"Content"; } @@ -164,6 +169,7 @@ function create_callsign_tab(callsign, active=false) { //Create the html for the callsign tab and insert it into the DOM var callsignTabs = $("#msgsTabList"); tab_id = tab_string(callsign); + tab_id_li = tab_li_string(callsign); tab_content = tab_content_name(callsign); if (active) { active_str = "active"; @@ -171,7 +177,7 @@ function create_callsign_tab(callsign, active=false) { active_str = ""; } - item_html = '