From 03167d0b831bb1069c6d6f6fa05fd8612b5f0d33 Mon Sep 17 00:00:00 2001 From: Boris Brock Date: Tue, 4 Oct 2022 21:27:59 +0200 Subject: [PATCH] Hiding previous/next buttons in all time view --- site/index.html | 4 ++-- site/js/main.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/site/index.html b/site/index.html index bf22746..d6efd49 100644 --- a/site/index.html +++ b/site/index.html @@ -1259,7 +1259,7 @@

...

-
@@ -1292,7 +1292,7 @@

...

-
diff --git a/site/js/main.js b/site/js/main.js index 2c3e32b..7f59224 100644 --- a/site/js/main.js +++ b/site/js/main.js @@ -336,6 +336,8 @@ function showViewHistory(mode) { case histories.TODAY: selectDate(new Date()); document.getElementById("headline_history").innerHTML = getHistoryString("daily_data"); + setElementVisible("selection_prev", true); + setElementVisible("selection_next", true); setElementVisible("selection_year", true); setElementVisible("selection_month", true); setElementVisible("selection_day", true); @@ -343,6 +345,8 @@ function showViewHistory(mode) { setElementVisible("history_card_high_res", true); case histories.DAY: document.getElementById("headline_history").innerHTML = getHistoryString("daily_data"); + setElementVisible("selection_prev", true); + setElementVisible("selection_next", true); setElementVisible("selection_year", true); setElementVisible("selection_month", true); setElementVisible("selection_day", true); @@ -351,6 +355,8 @@ function showViewHistory(mode) { break; case histories.MONTH: document.getElementById("headline_history").innerHTML = getHistoryString("monthly_data"); + setElementVisible("selection_prev", true); + setElementVisible("selection_next", true); setElementVisible("selection_year", true); setElementVisible("selection_month", true); setElementVisible("selection_day", false); @@ -360,6 +366,8 @@ function showViewHistory(mode) { break; case histories.YEAR: document.getElementById("headline_history").innerHTML = getHistoryString("yearly_data"); + setElementVisible("selection_prev", true); + setElementVisible("selection_next", true); setElementVisible("selection_year", true); setElementVisible("selection_month", false); setElementVisible("selection_day", false); @@ -369,6 +377,8 @@ function showViewHistory(mode) { break; case histories.ALL: document.getElementById("headline_history").innerHTML = getHistoryString("all_time_data"); + setElementVisible("selection_prev", false); + setElementVisible("selection_next", false); setElementVisible("selection_year", false); setElementVisible("selection_month", false); setElementVisible("selection_day", false);