Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSLogic
Commits
924e64c9
Commit
924e64c9
authored
8 months ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
feat: Adjust button labels according to map type
parent
36738361
No related branches found
No related tags found
1 merge request
!191
Add map module and Open-Meteo support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/webapp/js/mapModal.js
+4
-2
4 additions, 2 deletions
src/main/webapp/js/mapModal.js
with
4 additions
and
2 deletions
src/main/webapp/js/mapModal.js
+
4
−
2
View file @
924e64c9
...
@@ -35,6 +35,7 @@ class MapModal {
...
@@ -35,6 +35,7 @@ class MapModal {
static
TRANSLATIONS
=
{
static
TRANSLATIONS
=
{
nb
:
{
nb
:
{
selectLocation
:
'
Velg sted
'
,
selectLocation
:
'
Velg sted
'
,
selectCoordinates
:
'
Velg punkt
'
,
createNewLocation
:
'
Opprett nytt sted
'
,
createNewLocation
:
'
Opprett nytt sted
'
,
name
:
'
Navn
'
,
name
:
'
Navn
'
,
latitude
:
'
Breddegrad
'
,
latitude
:
'
Breddegrad
'
,
...
@@ -54,6 +55,7 @@ class MapModal {
...
@@ -54,6 +55,7 @@ class MapModal {
},
},
en
:
{
en
:
{
selectLocation
:
'
Select location
'
,
selectLocation
:
'
Select location
'
,
selectCoordinates
:
'
Select point
'
,
createNewLocation
:
'
Create New Location
'
,
createNewLocation
:
'
Create New Location
'
,
name
:
'
Name
'
,
name
:
'
Name
'
,
latitude
:
'
Latitude
'
,
latitude
:
'
Latitude
'
,
...
@@ -394,7 +396,7 @@ class MapModal {
...
@@ -394,7 +396,7 @@ class MapModal {
const
type
=
this
.
translations
[
'
poiType
'
+
feature
.
properties
.
pointOfInterestTypeId
];
const
type
=
this
.
translations
[
'
poiType
'
+
feature
.
properties
.
pointOfInterestTypeId
];
const
latitude
=
feature
.
geometry
.
coordinates
[
1
].
toFixed
(
this
.
coordinatePrecision
);
const
latitude
=
feature
.
geometry
.
coordinates
[
1
].
toFixed
(
this
.
coordinatePrecision
);
const
longitude
=
feature
.
geometry
.
coordinates
[
0
].
toFixed
(
this
.
coordinatePrecision
);
const
longitude
=
feature
.
geometry
.
coordinates
[
0
].
toFixed
(
this
.
coordinatePrecision
);
const
buttonLabel
=
this
.
translations
.
selectLocation
;
const
buttonLabel
=
this
.
isPoiMap
?
this
.
translations
.
selectLocation
:
this
.
translations
.
selectCoordinates
;
if
(
this
.
isPoiMap
)
{
if
(
this
.
isPoiMap
)
{
popupElement
.
innerHTML
=
`<h4>
${
name
}
</h4>
popupElement
.
innerHTML
=
`<h4>
${
name
}
</h4>
...
@@ -470,7 +472,7 @@ class MapModal {
...
@@ -470,7 +472,7 @@ class MapModal {
</select>
</select>
</div>
</div>
<div class="form-group text-right">
<div class="form-group text-right">
<button id="map-poi-submit-button" class="btn btn-primary">
${
this
.
translations
.
selectLocation
}
</button>
<button id="map-poi-submit-button" class="btn btn-primary">
${
this
.
isPoiMap
?
this
.
translations
.
selectLocation
:
this
.
translations
.
selectCoordinates
}
</button>
</div>
</div>
</div>`
;
</div>`
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment