Commit 01fb29e8 authored by Andre Togawa's avatar Andre Togawa
Browse files

Merge branch '220523-1' into 'master'

fix: url  and customvocab type

See merge request !13
parents f68e0a7c afd613c2
......@@ -220,10 +220,13 @@ window.addEventListener('load', function () {
var divSingleItem = divGetODloop[0].querySelectorAll('div.getod-item-set-url a');
var divSingleItemEmpty = divGetODloop[0].querySelectorAll('div.getod-item-set-url');
if (divSingleItem.length>0){
aUrl= divSingleItem[0].getAttribute("href");
divSingleItem[0].href= aUrl +'?item_id='+ jasonData[i]['o:id'];
divSingleItemEmpty[0].classList.remove("getod-empty");
if (divSingleItem.length>0){
for (let j = 0; j < divSingleItem.length; ++j) {
aUrl= divSingleItem[j].getAttribute("href");
divSingleItem[j].href= aUrl +'?item_id='+ jasonData[i]['o:id'];
divSingleItemEmpty[j].classList.remove("getod-empty");
}
}
}
......@@ -378,12 +381,17 @@ function PopulateFields(jasonData, divItem, loopType){
value = atributo[0]['@id'];
}
} // esse item sera tratado em uma nova busca de API
if (tipo == 'literal' || tipo == 'numeric:timestamp' || tipo == 'customvocab:18') {
if (tipo == 'literal' || tipo == 'numeric:timestamp' || tipo.includes('customvocab')) {
if (atributo[0].hasOwnProperty('@value')) {
value = atributo[0]['@value'];
value = value.replace(/\n/g, "<br />");
}
}
}
else if (atributo[0].hasOwnProperty('@id')) {
value = atributo[0]['@id'];
}
}
}
return value;
}
......@@ -676,7 +684,7 @@ function PopulateListFullFields(jsonData){
let mediaType = "";
mediaType = listData[j]['thumbnail_type']; if (mediaType != undefined){mediaType = mediaType.substring(0, mediaType.indexOf("/")); }
if (listData[j]['type']=='literal' & showtext!='false'){
if (listData[j]['type']=='literal' & showtext!='false' || listData[j]['type'].includes('customvocab')& showtext!='false') {
let elementLiteral = '';
if (elementHtml=='div'){
......
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