Added week to settings

This commit is contained in:
rxf
2023-04-21 17:31:39 +02:00
parent 7763c1e43d
commit 58e25bf468
8 changed files with 41 additions and 19 deletions
+5 -2
View File
@@ -3,7 +3,7 @@
"Settings": "Einstellungen",
"Info": "Info",
"StartDate": "Start Datum",
"NumberOfDays": "Anzahl Tage",
"NumberOfDays": "So viele Tage anzeigen",
"Only_for_live_chart": "Nur bei 'live' Grafik",
"Count_peaks_over": "Zähle Spitzen über",
"Close": "Schließen",
@@ -39,5 +39,8 @@
"DailyMeanValuesOfLDEN-Index": "Tages-Mittelwerte des L<sub>DEN</sub>-Index",
"Date": "Datum",
"Version": "Version",
"from": "vom"
"from": "vom",
"RemoveFromMap": "Sensoren nicht anzeigen, die nicht gesendet haben seit",
"weeks": "Wochen"
}
+5 -2
View File
@@ -3,7 +3,7 @@
"Settings": "Einstellungen",
"Info": "Info",
"StartDate": "Start Datum",
"NumberOfDays": "Anzahl Tage",
"NumberOfDays": "So viele Tage anzeigen",
"Only_for_live_chart": "Nur bei 'live' Grafik",
"Count_peaks_over": "Zähle Spitzen über",
"Close": "Schließen",
@@ -39,5 +39,8 @@
"DailyMeanValuesOfLDEN-Index": "Tages-Mittelwerte des L<sub>DEN</sub>-Index",
"Date": "Datum",
"Version": "Version",
"from": "vom"
"from": "vom",
"RemoveFromMap": "Sensoren nicht anzeigen, die nicht gesendet haben seit",
"weeks": "Wochen"
}
+5 -3
View File
@@ -2,8 +2,8 @@
"NoiseMeasurement": "Noise Measurement",
"Settings": "Settings",
"Info": "Info",
"StartDate": "Start date:",
"NumberOfDays": "Number of days",
"StartDate": "Start date",
"NumberOfDays": "Show so many days",
"Only_for_live_chart": "Only for 'live' chart",
"Count_peaks_over": "Count peaks over",
"Close": "Close",
@@ -39,5 +39,7 @@
"DailyMeanValuesOfLDEN-Index": "Daily mean values of L<sub>DEN</sub>-Index",
"Date": "Date",
"Version": "Version",
"from": "from"
"from": "from",
"RemoveFromMap": "Don't show sensors that have not sent for",
"weeks": "weeks"
}
+6
View File
@@ -21,6 +21,7 @@ import { DateTime } from './luxon.min.js'
zoom: 10,
span: 1,
peak: 70,
weeks: 4,
datetime: '',
seldate: 'today',
refresh: 0,
@@ -46,6 +47,7 @@ import { DateTime } from './luxon.min.js'
params.seldate = selDate
const span = document.getElementById('nbrofdays').value
const peak = document.getElementById('peaklim').value
const weeks = document.getElementById('olderthan').value
console.log(starttime, span, peak)
if(span < 10) {
params.span = span
@@ -53,6 +55,9 @@ import { DateTime } from './luxon.min.js'
if(peak < 130 ) {
params.peak = peak
}
if (weeks < 52) {
params.weeks = weeks
}
let newlng = document.querySelector('#sellan input:checked').id
let oldlng = localStorage.getItem('curlang')
localStorage.setItem('curlang', newlng)
@@ -75,6 +80,7 @@ import { DateTime } from './luxon.min.js'
document.getElementById('startday').value = params.seldate
document.getElementById('nbrofdays').value = params.span
document.getElementById('peaklim').value = params.peak
document.getElementById('olderthan').value = params.weeks
myModal.show()
})
+1
View File
@@ -64,6 +64,7 @@ export async function showMap(params, sysparams) {
await loadAll(params)
}
params.center = [clickedcoords.lat, clickedcoords.lng]
map.setView([clickedcoords.lat, clickedcoords.lng]);
})
})
}
+5 -5
View File
@@ -177,7 +177,7 @@ footer #author #versn {
}
.thelabels {
width: 40%;
width: 50%;
float: left;
}
@@ -197,11 +197,11 @@ footer #author #versn {
}
#startday {
width: 60%;
width: 40%;
}
#nbrofdays, #peaklim {
width: 20%;
#nbrofdays, #peaklim, #olderthan {
width: 10%;
}
.addit {
@@ -209,7 +209,7 @@ footer #author #versn {
border: 1px solid blue;
}
#klein {
.klein {
font-size: 80%;
}
+5 -5
View File
@@ -170,7 +170,7 @@ footer
text-align: left
.thelabels
width: 40%
width: 50%
float: left
// border: 1px solid green
@@ -189,16 +189,16 @@ footer
margin-bottom: 15px
#startday
width: 60%
width: 40%
#nbrofdays, #peaklim
width: 20%
#nbrofdays, #peaklim, #olderthan
width: 10%
.addit
width: 20%
border: 1px solid blue
#klein
.klein
font-size: 80%
.infoTafel th,td
+9 -2
View File
@@ -80,14 +80,21 @@ block content
.column
label.thelabels(for='nbrofdays')
| #{t("NumberOfDays")}:<br />
span#klein (#{t("Only_for_live_chart")})
span.klein (#{t("Only_for_live_chart")})
input.theInputs#nbrofdays(type = 'number' name = 'nbrofdays')
| &nbsp;&nbsp;(max. 10)
span.klein &nbsp;&nbsp;(max. 10)
.column
label.thelabels(for='peaklim')
| #{t("Count_peaks_over")}
input.theInputs#peaklim(type = 'number' name = 'peaklim')
| &nbsp;&nbsp;dbA
span.klein &nbsp;&nbsp;(max. 130)
.column
label.thelabels(for='olderthan')
| #{t("RemoveFromMap")}
input.theInputs#olderthan(type = 'number' name = 'olderthan')
| &nbsp;&nbsp;#{t("weeks")}
span.klein &nbsp;&nbsp;(max. 52)
.column#sellan
label.thelabels
| #{t("Language")}: