Mercurial > gemma
changeset 4668:63c529172334
Merged.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 14 Oct 2019 17:23:56 +0200 |
parents | 0ddb308fed37 (current diff) 5fb3134c3a0c (diff) |
children | 65845c6522fb |
files | |
diffstat | 6 files changed, 78 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepth.vue Mon Oct 14 17:23:29 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepth.vue Mon Oct 14 17:23:56 2019 +0200 @@ -92,6 +92,7 @@ import { displayError } from "@/lib/errors"; import { FREQUENCIES } from "@/store/fairwayavailability"; import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate"; +import { localeDateString } from "@/lib/datelocalization"; export default { mixins: [diagram, pdfgen, templateLoader], @@ -370,6 +371,7 @@ }; }, drawDiagram() { + d3.timeFormatDefaultLocale(localeDateString); const elem = document.querySelector("#" + this.containerId); const svgWidth = elem != null ? elem.clientWidth : 0; const svgHeight = elem != null ? elem.clientHeight : 0;
--- a/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Mon Oct 14 17:23:29 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Mon Oct 14 17:23:56 2019 +0200 @@ -92,6 +92,7 @@ import { displayError } from "@/lib/errors"; import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate"; import sanitize from "sanitize-filename"; +import { localeDateString } from "@/lib/datelocalization"; export default { mixins: [diagram, pdfgen, templateLoader], @@ -364,6 +365,7 @@ }; }, drawDiagram() { + d3.timeFormatDefaultLocale(localeDateString); const elem = document.querySelector("#" + this.containerId); const svgWidth = elem != null ? elem.clientWidth : 0; const svgHeight = elem != null ? elem.clientHeight : 0;
--- a/client/src/components/gauge/HydrologicalConditions.vue Mon Oct 14 17:23:29 2019 +0200 +++ b/client/src/components/gauge/HydrologicalConditions.vue Mon Oct 14 17:23:56 2019 +0200 @@ -116,6 +116,7 @@ import { HTTP } from "@/lib/http"; import { displayError } from "@/lib/errors"; import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate"; +import { localeDateString } from "@/lib/datelocalization"; import sanitize from "sanitize-filename"; export default { @@ -324,6 +325,7 @@ drawDiagram() { // remove old diagram d3.select("#" + this.containerId + " svg").remove(); + d3.timeFormatDefaultLocale(localeDateString); const el = document.querySelector("#" + this.containerId); if (!this.selectedGaugeD || !this.longtermWaterlevels.length || !el) return;
--- a/client/src/components/gauge/Waterlevel.vue Mon Oct 14 17:23:29 2019 +0200 +++ b/client/src/components/gauge/Waterlevel.vue Mon Oct 14 17:23:56 2019 +0200 @@ -127,6 +127,7 @@ import { displayError } from "@/lib/errors"; import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate"; import sanitize from "sanitize-filename"; +import { localeDateString } from "@/lib/datelocalization"; // we should load only d3 modules we need but for now we'll go with the lazy way // https://www.giacomodebidda.com/how-to-import-d3-plugins-with-webpack/ // d3-line-chunked plugin: https://github.com/pbeshai/d3-line-chunked @@ -318,6 +319,7 @@ drawDiagram(zoom) { // remove old diagram and exit if necessary data is missing d3.select("#" + this.containerId + " svg").remove(); + d3.timeFormatDefaultLocale(localeDateString); const elem = document.querySelector("#" + this.containerId); const svgWidth = elem.clientWidth; const svgHeight = elem.clientHeight;
--- a/client/src/components/toolbar/Profiles.vue Mon Oct 14 17:23:29 2019 +0200 +++ b/client/src/components/toolbar/Profiles.vue Mon Oct 14 17:23:56 2019 +0200 @@ -8,6 +8,17 @@ icon="chart-area" :class="{ 'text-info': showProfiles }" /> + <span + v-if="twoMapsVisible" + :class="[ + 'indicator', + { + show: true + } + ]" + > + 2 + </span> </div> </template> @@ -31,6 +42,10 @@ name: "profiles", computed: { ...mapState("application", ["showProfiles"]), + ...mapState("map", ["openLayersMaps"]), + twoMapsVisible() { + return this.openLayersMaps.length === 2 && !this.showProfiles; + }, label() { return this.$gettext("Bottleneck Surveys"); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/lib/datelocalization.js Mon Oct 14 17:23:56 2019 +0200 @@ -0,0 +1,55 @@ +import app from "@/main"; +const localeDateString = { + dateTime: app.$gettext("%a %e %b %X %Y"), + date: app.$gettext("%d/%m/%Y"), + time: app.$gettext("%H:%M:%S"), + periods: [app.$gettext("AM"), app.$gettext("PM")], + days: [ + app.$gettext("Sunday"), + app.$gettext("Monday"), + app.$gettext("Tuesday"), + app.$gettext("Wednesday"), + app.$gettext("Thursday"), + app.$gettext("Friday"), + app.$gettext("Saturday") + ], + shortDays: [ + app.$gettext("Sun"), + app.$gettext("Mon"), + app.$gettext("Tue"), + app.$gettext("Wed"), + app.$gettext("Thu"), + app.$gettext("Fri"), + app.$gettext("Sat") + ], + months: [ + app.$gettext("January"), + app.$gettext("February"), + app.$gettext("March"), + app.$gettext("April"), + app.$gettext("May"), + app.$gettext("June"), + app.$gettext("July"), + app.$gettext("August"), + app.$gettext("September"), + app.$gettext("October"), + app.$gettext("November"), + app.$gettext("December") + ], + shortMonths: [ + app.$gettext("Jan"), + app.$gettext("Feb"), + app.$gettext("Mar"), + app.$gettext("Apr"), + app.$gettext("May"), + app.$gettext("Jun"), + app.$gettext("Jul"), + app.$gettext("Aug"), + app.$gettext("Sep"), + app.$gettext("Oct"), + app.$gettext("Nov"), + app.$gettext("Dec") + ] +}; + +export { localeDateString };