diff --git a/aprsd/web/chat/static/css/index.css b/aprsd/web/chat/static/css/index.css index b39acab..3f99928 100644 --- a/aprsd/web/chat/static/css/index.css +++ b/aprsd/web/chat/static/css/index.css @@ -1,6 +1,6 @@ body { background: #eeeeee; - margin: 2em; + margin: 1em; text-align: center; font-family: system-ui, sans-serif; } @@ -11,34 +11,13 @@ footer { height: 10vh; } -.ui.segment { - background: #eeeeee; -} - -ul.list { - list-style-type: disc; -} -ul.list li { - list-style-position: outside; -} - -#left { - margin-right: 2px; - height: 300px; -} -#right { - height: 300px; -} -#center { - height: 300px; -} - #title { font-size: 4em; } #version{ font-size: .5em; } + #uptime, #aprsis { font-size: 1em; } @@ -66,29 +45,3 @@ ul.list li { width: 16px; height: 16px; } - -#msgsTabsDiv .ui.tab { - margin:0px; - padding:0px; - display: block; -} - -#msgsTabsDiv .header, .tiny.text, .content, .break, - .thumbs.down.outline.icon, - .phone.volume.icon - { - display: inline-block; - float: left; - position: relative; -} -#msgsTabsDiv .tiny.text { - width:100px; -} -#msgsTabsDiv .tiny.header { - width:100px; - text-align: left; -} -#msgsTabsDiv .break { - margin: 2px; - text-align: left; -} diff --git a/aprsd/web/chat/static/js/send-message.js b/aprsd/web/chat/static/js/send-message.js index 87d66e5..f683639 100644 --- a/aprsd/web/chat/static/js/send-message.js +++ b/aprsd/web/chat/static/js/send-message.js @@ -105,9 +105,12 @@ function init_messages() { console.log("Adding callsign " + callsign); if (first_callsign === null) { first_callsign = callsign; + active = true; console.log("first_callsign " + first_callsign) + } else { + active = false; } - create_callsign_tab(callsign); + create_callsign_tab(callsign, active); } // and then populate the messages in order for (callsign in message_list) { @@ -131,27 +134,54 @@ function init_messages() { } //Click on the very first tab + /* if (first_callsign !== null) { - click_div = '#'+tab_string(first_callsign); + callsign_tab_id = callsign_tab(first_callsign); var click_timer = setTimeout(function() { - console.log("Click on first tab " + click_div); - $(click_div).click(); + console.log("Click on first tab " + callsign_tab_id); + $(callsign_tab_id).click(); clearTimeout(click_timer); }, 500); } + */ } -function create_callsign_tab(callsign) { +function create_callsign_tab(callsign, active=false) { //Create the html for the callsign tab and insert it into the DOM console.log("create_callsign_tab " + callsign) - var callsignTabs = $("#callsignTabs"); - tab_name = tab_string(callsign); + var callsignTabs = $("#msgsTabList"); + tab_id = tab_string(callsign); tab_content = tab_content_name(callsign); - divname = content_divname(callsign); + if (active) { + active_str = "active"; + } else { + active_str = ""; + } - item_html = '
'+from+' '; msg_html += '
'; @@ -257,7 +300,7 @@ function create_message_html(date, time, from, to, message, ack_id, msg, acked=f msg_html += ''+message+'
'; msg_html += ''; - msg_html += "