diff --git a/README.md b/README.md index d568551..1deb42b 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Actually known: * change ownership to your user for example with `sudo chown -R pi /opt/MMDVMDash` * copy all files from repository into this folder * modify *logtailer.ini* to fit your needs -* modify */html/js/config.js* to fit your needs, here you can switch on/off tabs showing or enable debug for getting some output in javascript console +* modify */html/js/config.js* to fit your needs, here you can switch on/off tabs showing or enable debug for getting some output in javascript console. You should take a look into this file - here are different options you can configure. * copy files in */opt/MMDVMDash/systemd* to */etc/systemd/system* or similar corresponding to your system * modify both scripts to fit your needs * enable services with following commmands, this results in starting both automatically after reboot: diff --git a/html/index.html b/html/index.html index d09d234..6019b88 100644 --- a/html/index.html +++ b/html/index.html @@ -38,7 +38,7 @@
-
+
Currently TXing
diff --git a/html/js/config.js b/html/js/config.js index 71cd329..d5b0d82 100644 --- a/html/js/config.js +++ b/html/js/config.js @@ -2,7 +2,7 @@ var qrz = 1; // 1 = enable debug in javascript-console, 0 = 0ff -var debug = 0; +var debug = 1; // Set messagecounters for different badge-colors var warnlevel = 200; @@ -16,3 +16,7 @@ var showLocalHeadTab = 1; var showInQSOTab = 1; var showDAPNETMessagesTab = 1; var showAboutTab = 1; + +// default-tab to show +// chose from following list: CurrTXTab, LastHeardTab, LocalHeadTab, InQSOTab, DAPNETMessagesTab, AboutTab +var defaultTab = "LastHeardTab"; \ No newline at end of file diff --git a/html/js/functions.js b/html/js/functions.js index 8ab15e6..609b96e 100644 --- a/html/js/functions.js +++ b/html/js/functions.js @@ -475,4 +475,61 @@ $(document).ready(function() { document.getElementById("myTab").children[5].style.display="none"; document.getElementById("about").style.display="none"; } + + switch (defaultTab) { + case "CurrTXTab": + var element = document.getElementById("currtx-tab"); + element.classList.add("active"); + element = document.getElementById("currtx"); + element.classList.add("show"); + element.classList.add("active"); + break; + case "LastHeardTab": + var element = document.getElementById("lastheard-tab"); + element.classList.add("active"); + + var element = document.getElementById("lastheard"); + element.classList.add("show"); + element.classList.add("active"); + break; + case "LocalHeadTab": + var element = document.getElementById("localheard-tab"); + element.classList.add("active"); + + var element = document.getElementById("localheard"); + element.classList.add("show"); + element.classList.add("active"); + break; + case "InQSOTab": + var element = document.getElementById("qso-tab"); + element.classList.add("active"); + + var element = document.getElementById("qso"); + element.classList.add("show"); + element.classList.add("active"); + break; + case "DAPNETMessagesTab": + var element = document.getElementById("dapnet-tab"); + element.classList.add("active"); + + var element = document.getElementById("dapnet"); + element.classList.add("show"); + element.classList.add("active"); + break; + case "AboutTab": + var element = document.getElementById("about-tab"); + element.classList.add("active"); + + var element = document.getElementById("about"); + element.classList.add("show"); + element.classList.add("active"); + break; + default: + var element = document.getElementById("currtx-tab"); + element.classList.add("active"); + element = document.getElementById("currtx"); + element.classList.add("show"); + element.classList.add("active"); + break; + } });