Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
b74173c0
Commit
b74173c0
authored
Oct 04, 2022
by
Eric Duminil
Browse files
Check checked inputs
parent
c0816b26
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
b74173c0
...
...
@@ -364,15 +364,12 @@ var regionChooser = (function(){
publicScope
.
clickety_click
=
function
()
{
console
.
log
(
"
You clicked pretty well
"
);
var
checkboxes
=
document
.
querySelectorAll
(
"
input.select_citygml
"
);
if
(
checkboxes
.
length
===
0
){
//FIXME: Wrong. There are at least one checkbox.
var
checkedBoxes
=
Array
.
from
(
document
.
querySelectorAll
(
"
input.select_citygml
"
)).
filter
(
x
=>
x
.
checked
);
if
(
checkedBoxes
.
length
===
0
){
console
.
log
(
"
You should select at least one citygml, though.
"
);
}
else
{
checkboxes
.
forEach
(
x
=>
{
if
(
x
.
checked
){
console
.
log
(
"
Nice! You checked Citygml
"
+
x
.
id
)
}
checkedBoxes
.
forEach
(
x
=>
{
console
.
log
(
"
Nice! You checked Citygml
"
+
x
.
id
)
});
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment