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
c647195b
Commit
c647195b
authored
10 months ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Add a couple of properties to form
parent
18b6a0b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/webapp/map_applications/phytophthora/js/map.js
+21
-13
21 additions, 13 deletions
src/main/webapp/map_applications/phytophthora/js/map.js
with
21 additions
and
13 deletions
src/main/webapp/map_applications/phytophthora/js/map.js
+
21
−
13
View file @
c647195b
...
@@ -413,12 +413,14 @@ var displayFeature = function (feature)
...
@@ -413,12 +413,14 @@ var displayFeature = function (feature)
'
<button type="button" onclick="deleteFeature(
'
+
feature
.
getId
()
+
'
)">Slett</button>
'
,
'
<button type="button" onclick="deleteFeature(
'
+
feature
.
getId
()
+
'
)">Slett</button>
'
,
'
<h3>Registrering</h3>
'
,
'
<h3>Registrering</h3>
'
,
'
<table>
'
,
'
<table>
'
,
'
<tr><td>Type</td><td>
'
,
getLocalizedOrganismName
(
feature
.
get
(
"
cropOrganism
"
),
hardcodedLanguage
),
'
</td></tr>
'
,
'
<tr><td>Plante</td><td>
'
,
getLocalizedOrganismName
(
feature
.
get
(
"
cropOrganism
"
),
hardcodedLanguage
),
'
</td></tr>
'
,
'
<tr><td>Plante spes</td><td>
'
,
observationData
[
"
plantespes
"
],
'
</td></tr>
'
,
'
<tr><td>Symptom</td><td>
'
,
observationData
[
"
symptom
"
],
'
</td></tr>
'
,
'
<tr><td>Symptom</td><td>
'
,
observationData
[
"
symptom
"
],
'
</td></tr>
'
,
'
<tr><td>
Funn
</td><td>
'
,
observationData
[
"
funn
"
],
'
</td></tr>
'
,
'
<tr><td>
Sym spes
</td><td>
'
,
observationData
[
"
symspes
"
],
'
</td></tr>
'
,
'
<tr><td>Prøvetype</td><td>
'
,
observationData
[
"
provetype
"
],
'
</td></tr>
'
,
'
<tr><td>Prøvetype</td><td>
'
,
observationData
[
"
provetype
"
],
'
</td></tr>
'
,
'
<tr><td>Prøvenummer</td><td>
'
,
observationData
[
"
provenummer
"
],
'
</td></tr>
'
,
'
<tr><td>Prøvenummer</td><td>
'
,
observationData
[
"
provenummer
"
],
'
</td></tr>
'
,
'
<tr><td>Beskrivelse</td><td>
'
,
feature
.
get
(
"
observationText
"
),
'
</td></tr>
'
,
'
<tr><td>Funn</td><td>
'
,
observationData
[
"
funn
"
],
'
</td></tr>
'
,
'
<tr><td>Mer info</td><td>
'
,
feature
.
get
(
"
observationText
"
),
'
</td></tr>
'
,
'
<tr><td>Dato</td><td>
'
,
timeOfObservation
.
format
(
"
DD.MM.YYYY
"
),
'
</td></tr>
'
,
'
<tr><td>Dato</td><td>
'
,
timeOfObservation
.
format
(
"
DD.MM.YYYY
"
),
'
</td></tr>
'
,
'
</table>
'
'
</table>
'
];
];
...
@@ -467,9 +469,9 @@ var getCropOrganism = function (organismId)
...
@@ -467,9 +469,9 @@ var getCropOrganism = function (organismId)
}
}
var
symptoms
=
[
"
Flekker
"
,
"
Glisne kroner
"
,
"
Andre symptom
"
,
"
Andre skader
"
,
"
Ikke symptom
"
,
"
Irrelevant
"
];
var
symptoms
=
[
"
Flekker
"
,
"
Glisne kroner
"
,
"
Død
"
,
"
Andre symptom
"
,
"
Andre skader
"
,
"
Ikke symptom
"
,
"
Irrelevant
"
];
var
funns
=
[
"
[Ukjent]
"
,
"
Phytophthora gonapodyides
"
,
"
Phytophthora lacustris
"
,
"
Phytophthora plurivora
"
,
"
Phytophthora cambivora
"
,
"
Phytophthora cactorum
"
,
"
Phytophthora sp
"
]
var
funns
=
[
"
[Ukjent]
"
,
"
Phytophthora gonapodyides
"
,
"
Phytophthora lacustris
"
,
"
Phytophthora plurivora
"
,
"
Phytophthora cambivora
"
,
"
Phytophthora cactorum
"
,
"
Phytophthora sp
"
]
var
provetypes
=
[
"
[Ikke prøve]
"
,
"
Jord
"
,
"
Vev
"
,
"
Vann
"
];
var
provetypes
=
[
"
[Ikke prøve]
"
,
"
Jord
"
,
"
Vev
"
,
"
Vann
"
,
"
Blad
"
,
"
Bait
"
];
var
editFeature
=
function
(
featureId
)
var
editFeature
=
function
(
featureId
)
...
@@ -484,22 +486,26 @@ var editFeature = function (featureId)
...
@@ -484,22 +486,26 @@ var editFeature = function (featureId)
(
featureId
>
0
?
'
<button type="button" onclick="deleteFeature(
'
+
featureId
+
'
)">Delete</button>
'
:
''
)
+
(
featureId
>
0
?
'
<button type="button" onclick="deleteFeature(
'
+
featureId
+
'
)">Delete</button>
'
:
''
)
+
'
<h3>
'
+
(
featureId
>
0
?
"
R
"
:
"
Ny r
"
)
+
'
egistrering</h3>
'
+
'
<h3>
'
+
(
featureId
>
0
?
"
R
"
:
"
Ny r
"
)
+
'
egistrering</h3>
'
+
'
<table>
'
+
'
<table>
'
+
'
<tr><td>
Typ
e</td><td>
'
+
'
<tr><td>
Plant
e</td><td>
'
+
generateCropSelect
(
"
forekomsttype
"
,
forekomsttyper
,
feature
.
get
(
"
cropOrganism
"
)[
"
organismId
"
])
+
generateCropSelect
(
"
forekomsttype
"
,
forekomsttyper
,
feature
.
get
(
"
cropOrganism
"
)[
"
organismId
"
])
+
'
</td></tr>
'
+
'
</td></tr>
'
+
'
<tr><td>Plante spes.</td><td>
'
+
'
<input type="text" id="plantespes" name="plantespes" size="15" value="
'
+
(
observationData
[
"
plantespes
"
]
!=
null
?
observationData
[
"
plantespes
"
]
:
""
)
+
'
"/></td></tr>
'
+
'
<tr><td>Symptom</td><td>
'
+
'
<tr><td>Symptom</td><td>
'
+
generateSelect
(
"
symptom
"
,
symptoms
,
observationData
[
"
symptom
"
])
+
generateSelect
(
"
symptom
"
,
symptoms
,
observationData
[
"
symptom
"
])
+
'
</td></tr>
'
+
'
</td></tr>
'
+
'
<tr><td>
Funn
</td><td>
'
+
'
<tr><td>
Sym spes.
</td><td>
'
+
generateSelect
(
"
funn
"
,
funns
,
observationData
[
"
funn
"
])
+
'
<input type="text" id="symspes" name="symspes" size="15" value="
'
+
(
observationData
[
"
symspes
"
]
!=
null
?
observationData
[
"
symspes
"
]
:
""
)
+
'
"/></td></tr>
'
+
'
</td></tr>
'
+
'
<tr><td>Prøvetype</td><td>
'
+
'
<tr><td>Prøvetype</td><td>
'
+
generateSelect
(
"
provetype
"
,
provetypes
,
observationData
[
"
provetype
"
])
+
generateSelect
(
"
provetype
"
,
provetypes
,
observationData
[
"
provetype
"
])
+
'
</td></tr>
'
+
'
</td></tr>
'
+
'
<tr><td>Prøvenummer</td><td>
'
+
'
<tr><td>Prøvenummer</td><td>
'
+
'
<input type="text" id="provenummer" name="provenummer" size="15" value="
'
+
(
observationData
[
"
provenummer
"
]
!=
null
?
observationData
[
"
provenummer
"
]
:
""
)
+
'
"/></td></tr>
'
+
'
<input type="text" id="provenummer" name="provenummer" size="15" value="
'
+
(
observationData
[
"
provenummer
"
]
!=
null
?
observationData
[
"
provenummer
"
]
:
""
)
+
'
"/></td></tr>
'
+
'
<tr><td></td><td>
'
+
'
<tr><td>Funn</td><td>
'
+
'
<tr><td>Beskrivelse</td><td>
'
+
generateSelect
(
"
funn
"
,
funns
,
observationData
[
"
funn
"
])
+
'
</td></tr>
'
+
'
<tr><td>Mer info</td><td>
'
+
'
<textarea id="beskrivelse" name="beskrivelse">
'
+
(
feature
.
get
(
"
observationText
"
)
!=
null
?
feature
.
get
(
"
observationText
"
)
:
""
)
+
'
</textarea>
'
+
'
<textarea id="beskrivelse" name="beskrivelse">
'
+
(
feature
.
get
(
"
observationText
"
)
!=
null
?
feature
.
get
(
"
observationText
"
)
:
""
)
+
'
</textarea>
'
+
'
</td></tr>
'
+
'
</td></tr>
'
+
'
<tr><td>Dato</td><td>
'
+
'
<tr><td>Dato</td><td>
'
+
...
@@ -526,10 +532,12 @@ var storeFeature = function (featureId)
...
@@ -526,10 +532,12 @@ var storeFeature = function (featureId)
// Add the form data
// Add the form data
var
cropOrganism
=
getCropOrganism
(
document
.
getElementById
(
"
forekomsttype
"
).
options
[
document
.
getElementById
(
"
forekomsttype
"
).
options
.
selectedIndex
].
value
);
var
cropOrganism
=
getCropOrganism
(
document
.
getElementById
(
"
forekomsttype
"
).
options
[
document
.
getElementById
(
"
forekomsttype
"
).
options
.
selectedIndex
].
value
);
//console.info(cropOrganism);
//console.info(cropOrganism);
var
plantespes
=
document
.
getElementById
(
"
plantespes
"
).
value
;
var
symptom
=
document
.
getElementById
(
"
symptom
"
).
options
[
document
.
getElementById
(
"
symptom
"
).
options
.
selectedIndex
].
value
;
var
symptom
=
document
.
getElementById
(
"
symptom
"
).
options
[
document
.
getElementById
(
"
symptom
"
).
options
.
selectedIndex
].
value
;
var
funn
=
document
.
getElementById
(
"
funn
"
).
options
[
document
.
getElementById
(
"
funn
"
).
options
.
selectedIndex
]
.
value
;
var
symspes
=
document
.
getElementById
(
"
symspes
"
)
.
value
;
var
provetype
=
document
.
getElementById
(
"
provetype
"
).
options
[
document
.
getElementById
(
"
provetype
"
).
options
.
selectedIndex
].
value
;
var
provetype
=
document
.
getElementById
(
"
provetype
"
).
options
[
document
.
getElementById
(
"
provetype
"
).
options
.
selectedIndex
].
value
;
var
provenummer
=
document
.
getElementById
(
"
provenummer
"
).
value
;
var
provenummer
=
document
.
getElementById
(
"
provenummer
"
).
value
;
var
funn
=
document
.
getElementById
(
"
funn
"
).
options
[
document
.
getElementById
(
"
funn
"
).
options
.
selectedIndex
].
value
;
var
observationText
=
document
.
getElementById
(
"
beskrivelse
"
).
value
;
var
observationText
=
document
.
getElementById
(
"
beskrivelse
"
).
value
;
var
observationHeading
=
"
Registrering av phytophthora
"
;
var
observationHeading
=
"
Registrering av phytophthora
"
;
var
timeOfObservation
=
moment
(
document
.
getElementById
(
"
dato
"
).
value
+
"
+0200
"
,
"
DD.MM.YYYYZ
"
);
var
timeOfObservation
=
moment
(
document
.
getElementById
(
"
dato
"
).
value
+
"
+0200
"
,
"
DD.MM.YYYYZ
"
);
...
@@ -545,7 +553,7 @@ var storeFeature = function (featureId)
...
@@ -545,7 +553,7 @@ var storeFeature = function (featureId)
organism
:
phytophthora
,
organism
:
phytophthora
,
observationHeading
:
observationHeading
,
observationHeading
:
observationHeading
,
observationText
:
observationText
,
observationText
:
observationText
,
observationData
:
"
{
\"
symptom
\"
:
\"
"
+
symptom
+
"
\"
,
\"
funn
\"
:
\"
"
+
funn
+
"
\"
,
\"
provetype
\"
:
\"
"
+
provetype
+
"
\"
,
\"
provenummer
\"
:
\"
"
+
provenummer
+
"
\"
}
"
,
observationData
:
"
{
\"
plantespes
\"
:
\"
"
+
plantespes
+
"
\"
,
\"
symptom
\"
:
\"
"
+
symptom
+
"
\"
,
\"
symspes
\"
:
\"
"
+
symspes
+
"
\"
,
\"
funn
\"
:
\"
"
+
funn
+
"
\"
,
\"
provetype
\"
:
\"
"
+
provetype
+
"
\"
,
\"
provenummer
\"
:
\"
"
+
provenummer
+
"
\"
}
"
,
statusTypeId
:
3
,
statusTypeId
:
3
,
statusRemarks
:
"
Registrert via phytophthora-overvåkningskartet
"
,
statusRemarks
:
"
Registrert via phytophthora-overvåkningskartet
"
,
isQuantified
:
true
,
isQuantified
:
true
,
...
...
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