From 36a110a8b10e852682a73d10182ba4ab30589394 Mon Sep 17 00:00:00 2001 From: Luke Prior <22492406+LukePrior@users.noreply.github.com> Date: Sun, 18 Apr 2021 19:29:02 +1000 Subject: [PATCH] Fix mobile version display 2 --- auto_rx/autorx/templates/index.html | 35 +++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/auto_rx/autorx/templates/index.html b/auto_rx/autorx/templates/index.html index d614663..85df0b2 100644 --- a/auto_rx/autorx/templates/index.html +++ b/auto_rx/autorx/templates/index.html @@ -68,7 +68,10 @@ async: true, success: function(data) { // Update the current version field. - $('#currentversion').text(data.current); + if (getCookie('version') == "false") {} + else { + $('#currentversion').text(data.current); + } // Update the latest version area. if(data.latest == 'Latest'){ @@ -273,6 +276,13 @@ document.getElementById("showimperialbutton").checked = false; } + // Check if user has version shown selection. + if (getCookie('version') == 'false') { + document.getElementById("showversionbutton").checked = false; + } else { + document.getElementById("showversionbutton").checked = true; + } + // Check if user has preffered scan chart visiblity. if (getCookie('scan') == 'true') { document.getElementById("showscanbutton").checked = true; @@ -354,6 +364,17 @@ } }); + // Check if show version button has been ticked. + $('#showversionbutton').change(function() { + if ($(this).is(":checked")) { + setCookie("version", 'true', 365); + location.reload(); + } else { + setCookie("version", 'false', 365); + location.reload(); + } + }); + // Check if UTC button has been ticked. $('#showUTCbutton').change(function() { if ($(this).is(":checked")) { @@ -1418,7 +1439,17 @@
-
+
+

Show Software Version

+   +
+ +
+
+

Live KML