Commit 6c448bfb authored by sendler's avatar sendler 🐢
Browse files

Merge branch 'feature/register-update' into 'staging'

Feature/register update

See merge request ARCHITRAVE/SADE!14
parents 59bb0275 c64729ca
...@@ -139,4 +139,8 @@ caption { ...@@ -139,4 +139,8 @@ caption {
.column { .column {
flex: 1 1 auto; flex: 1 1 auto;
}
.small-caps {
font-variant: small-caps
} }
\ No newline at end of file
...@@ -189,14 +189,6 @@ try { ...@@ -189,14 +189,6 @@ try {
function setRegElement(element, content) { function setRegElement(element, content) {
try {
$(element).text(content)
} catch (e) {
console.log(e)
}
}
function setRegElementHTML(element, content) {
try { try {
$(element).html(content) $(element).html(content)
} catch (e) { } catch (e) {
...@@ -1484,7 +1476,7 @@ function getRestAPIPerson(textGridURI) { ...@@ -1484,7 +1476,7 @@ function getRestAPIPerson(textGridURI) {
console.log("getting description"); console.log("getting description");
output = data.person.note.filter(el => el['type'] == 'description').filter(el => el['xml:lang'] == lang)[0]['#text']; output = data.person.note.filter(el => el['type'] == 'description').filter(el => el['xml:lang'] == lang)[0]['#text'];
if (typeof output === 'string') { if (typeof output === 'string') {
setRegElementHTML('#regPersonDescription', output) setRegElement('#regPersonDescription', output)
} else { } else {
console.log("no string"); console.log("no string");
hideRegElementDescription('#regPersonDescription') hideRegElementDescription('#regPersonDescription')
...@@ -1672,7 +1664,7 @@ function getRestAPIPlaces(textGridURI) { ...@@ -1672,7 +1664,7 @@ function getRestAPIPlaces(textGridURI) {
try { try {
output = data.place.note.filter(el => el['type'] == 'description').filter(el => el['xml:lang'] == lang)[0]['#text']; output = data.place.note.filter(el => el['type'] == 'description').filter(el => el['xml:lang'] == lang)[0]['#text'];
if (typeof output === 'string') { if (typeof output === 'string') {
setRegElementHTML('#regPlaceDescription', output) setRegElement('#regPlaceDescription', output)
} else { } else {
hideRegElementDescription('#regPlaceDescription') hideRegElementDescription('#regPlaceDescription')
} }
...@@ -1839,7 +1831,7 @@ function getRestAPIWorks(textGridURI) { ...@@ -1839,7 +1831,7 @@ function getRestAPIWorks(textGridURI) {
try { try {
output = data.item.note.filter(el => el['type'] == 'description').filter(el => el['xml:lang'] == lang)[0]['#text']; output = data.item.note.filter(el => el['type'] == 'description').filter(el => el['xml:lang'] == lang)[0]['#text'];
if (typeof output === 'string') { if (typeof output === 'string') {
setRegElementHTML('#regWorkDescription', output) setRegElement('#regWorkDescription', output)
} else { } else {
hideRegElementDescription('#regWorkDescription') hideRegElementDescription('#regWorkDescription')
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment