Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ARCHITRAVE
SADE
Commits
c64729ca
Commit
c64729ca
authored
Oct 13, 2020
by
sendler
🐢
Browse files
modify register.js for correct display of content
parent
7b5d7ebc
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/js/registers.js
View file @
c64729ca
...
...
@@ -189,14 +189,6 @@ try {
function
setRegElement
(
element
,
content
)
{
try
{
$
(
element
).
text
(
content
)
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
function
setRegElementHTML
(
element
,
content
)
{
try
{
$
(
element
).
html
(
content
)
}
catch
(
e
)
{
...
...
@@ -1484,7 +1476,7 @@ function getRestAPIPerson(textGridURI) {
console
.
log
(
"
getting description
"
);
output
=
data
.
person
.
note
.
filter
(
el
=>
el
[
'
type
'
]
==
'
description
'
).
filter
(
el
=>
el
[
'
xml:lang
'
]
==
lang
)[
0
][
'
#text
'
];
if
(
typeof
output
===
'
string
'
)
{
setRegElement
HTML
(
'
#regPersonDescription
'
,
output
)
setRegElement
(
'
#regPersonDescription
'
,
output
)
}
else
{
console
.
log
(
"
no string
"
);
hideRegElementDescription
(
'
#regPersonDescription
'
)
...
...
@@ -1672,7 +1664,7 @@ function getRestAPIPlaces(textGridURI) {
try
{
output
=
data
.
place
.
note
.
filter
(
el
=>
el
[
'
type
'
]
==
'
description
'
).
filter
(
el
=>
el
[
'
xml:lang
'
]
==
lang
)[
0
][
'
#text
'
];
if
(
typeof
output
===
'
string
'
)
{
setRegElement
HTML
(
'
#regPlaceDescription
'
,
output
)
setRegElement
(
'
#regPlaceDescription
'
,
output
)
}
else
{
hideRegElementDescription
(
'
#regPlaceDescription
'
)
}
...
...
@@ -1839,7 +1831,7 @@ function getRestAPIWorks(textGridURI) {
try
{
output
=
data
.
item
.
note
.
filter
(
el
=>
el
[
'
type
'
]
==
'
description
'
).
filter
(
el
=>
el
[
'
xml:lang
'
]
==
lang
)[
0
][
'
#text
'
];
if
(
typeof
output
===
'
string
'
)
{
setRegElement
HTML
(
'
#regWorkDescription
'
,
output
)
setRegElement
(
'
#regWorkDescription
'
,
output
)
}
else
{
hideRegElementDescription
(
'
#regWorkDescription
'
)
}
...
...
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