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
7ffa2efd
Commit
7ffa2efd
authored
8 months ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
feat: Make element ids more specific
parent
bf5108fc
Branches
Branches containing commit
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
+16
-17
16 additions, 17 deletions
src/main/webapp/js/mapModal.js
with
16 additions
and
17 deletions
src/main/webapp/js/mapModal.js
+
16
−
17
View file @
7ffa2efd
...
...
@@ -58,7 +58,6 @@ class MapModal {
submitLocation
:
'
OK
'
,
zoomToLocation
:
'
Zoom to My Location
'
,
geolocationNotSupported
:
'
Geolocation is not supported by this browser
'
,
geolocationNotSupported
:
'
Geolocation is not supported by this browser
'
,
geolocationFailed
:
'
Unable to retrieve your location
'
,
closeMap
:
'
Close Map
'
}
...
...
@@ -301,12 +300,12 @@ class MapModal {
DomEvent
.
disableClickPropagation
(
newPointFormElement
);
document
.
addEventListener
(
'
click
'
,
this
.
handleClickOutsidePointForm
.
bind
(
this
),
true
);
const
closeButton
=
newPointFormElement
.
querySelector
(
"
#close-button
"
);
const
nameInput
=
newPointFormElement
.
querySelector
(
'
#name
'
);
const
latitudeInput
=
newPointFormElement
.
querySelector
(
'
#latitude
'
);
const
longitudeInput
=
newPointFormElement
.
querySelector
(
'
#longitude
'
);
const
typeInput
=
newPointFormElement
.
querySelector
(
'
#type
'
);
const
submitButton
=
newPointFormElement
.
querySelector
(
'
#submit-button
'
);
const
closeButton
=
newPointFormElement
.
querySelector
(
"
#
map-poi-
close-button
"
);
const
nameInput
=
newPointFormElement
.
querySelector
(
'
#
map-poi-
name
'
);
const
latitudeInput
=
newPointFormElement
.
querySelector
(
'
#
map-poi-
latitude
'
);
const
longitudeInput
=
newPointFormElement
.
querySelector
(
'
#
map-poi-
longitude
'
);
const
typeInput
=
newPointFormElement
.
querySelector
(
'
#
map-poi-
type
'
);
const
submitButton
=
newPointFormElement
.
querySelector
(
'
#
map-poi-
submit-button
'
);
// Add options for the allowed types - or remove the select list altogether
if
(
this
.
includeTypeInformation
)
{
...
...
@@ -434,28 +433,28 @@ class MapModal {
form
.
innerHTML
=
`
<div class="panel-heading">
<h4 class="panel-title">
${
this
.
translations
.
createNewLocation
}
</h4>
<span id="close-button" style="position: absolute; top: 5px; right: 10px; cursor: pointer; font-size: 18px;">×</span>
<span id="
map-poi-
close-button" style="position: absolute; top: 5px; right: 10px; cursor: pointer; font-size: 18px;">×</span>
</div>
<div class="panel-body">
<div class="form-group">
<label for="name">
${
this
.
translations
.
name
}
:</label>
<input type="text" class="form-control" id="name" name="name">
<label for="
map-poi-
name">
${
this
.
translations
.
name
}
:</label>
<input type="text" class="form-control" id="
map-poi-
name" name="name">
</div>
<div class="form-group">
<label for="latitude">
${
this
.
translations
.
latitude
}
:</label>
<input type="text" class="form-control" id="latitude" name="latitude" value="
${
latitude
.
toFixed
(
this
.
coordinatePrecision
)}
">
<label for="
map-poi-
latitude">
${
this
.
translations
.
latitude
}
:</label>
<input type="text" class="form-control" id="
map-poi-
latitude" name="latitude" value="
${
latitude
.
toFixed
(
this
.
coordinatePrecision
)}
">
</div>
<div class="form-group">
<label for="longitude">
${
this
.
translations
.
longitude
}
:</label>
<input type="text" class="form-control" id="longitude" name="longitude" value="
${
longitude
.
toFixed
(
this
.
coordinatePrecision
)}
">
<label for="
map-poi-
longitude">
${
this
.
translations
.
longitude
}
:</label>
<input type="text" class="form-control" id="
map-poi-
longitude" name="longitude" value="
${
longitude
.
toFixed
(
this
.
coordinatePrecision
)}
">
</div>
<div class="form-group">
<label for="poi
T
ype
Select
">
${
this
.
translations
.
type
}
:</label>
<select class="form-control" id="type" name="type">
<label for="
map-
poi
-t
ype">
${
this
.
translations
.
type
}
:</label>
<select class="form-control" id="
map-poi-
type" name="type">
</select>
</div>
<div class="form-group text-right">
<button id="submit-button" class="btn btn-primary">
${
this
.
translations
.
submitLocation
}
</button>
<button id="
map-poi-
submit-button" class="btn btn-primary">
${
this
.
translations
.
submitLocation
}
</button>
</div>
</div>`
;
this
.
mapContainerElement
.
appendChild
(
form
);
...
...
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