[Trunk|Library]: Bug fix: In Landing and Search Pages for results (publ, datas, soft, orp), make title string necessarily (may be number).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55955 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
2dd9935734
commit
e3d0462f9d
|
@ -88,12 +88,12 @@ export class DatasetService {
|
||||||
// ['result']['metadata']['oaf:entity']['oaf:result']['title']
|
// ['result']['metadata']['oaf:entity']['oaf:result']['title']
|
||||||
if(data[1] != null) {
|
if(data[1] != null) {
|
||||||
if(Array.isArray(data[1])) {
|
if(Array.isArray(data[1])) {
|
||||||
this.datasetInfo.title = data[1][0].content;
|
this.datasetInfo.title = String(data[1][0].content);
|
||||||
if(data[1][1].classid == "subtitle") {
|
if(data[1][1].classid == "subtitle") {
|
||||||
this.datasetInfo.subtitle = data[1][1].content;
|
this.datasetInfo.subtitle = String(data[1][1].content);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.datasetInfo.title = data[1].content;
|
this.datasetInfo.title = String(data[1].content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,9 @@ export class OrpService {
|
||||||
}
|
}
|
||||||
if(data[1] != null) {
|
if(data[1] != null) {
|
||||||
if(Array.isArray(data[1])) {
|
if(Array.isArray(data[1])) {
|
||||||
this.orpInfo.title = data[1][0].content;
|
this.orpInfo.title = String(data[1][0].content);
|
||||||
} else {
|
} else {
|
||||||
this.orpInfo.title = data[1].content;
|
this.orpInfo.title = String(data[1].content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,9 +92,9 @@ export class PublicationService {
|
||||||
}
|
}
|
||||||
if(data[1] != null) {
|
if(data[1] != null) {
|
||||||
if(Array.isArray(data[1])) {
|
if(Array.isArray(data[1])) {
|
||||||
this.publicationInfo.title = data[1][0].content;
|
this.publicationInfo.title = String(data[1][0].content);
|
||||||
} else {
|
} else {
|
||||||
this.publicationInfo.title = data[1].content;
|
this.publicationInfo.title = String(data[1].content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,9 +88,9 @@ export class SoftwareService {
|
||||||
}
|
}
|
||||||
if(data[1] != null) {
|
if(data[1] != null) {
|
||||||
if(Array.isArray(data[1])) {
|
if(Array.isArray(data[1])) {
|
||||||
this.softwareInfo.title = data[1][0].content;
|
this.softwareInfo.title = String(data[1][0].content);
|
||||||
} else {
|
} else {
|
||||||
this.softwareInfo.title = data[1].content;
|
this.softwareInfo.title = String(data[1].content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,9 +186,9 @@ export class SearchDatasetsService {
|
||||||
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
result['title'].name = resData['title'][0].content;
|
result['title'].name = String(resData['title'][0].content);
|
||||||
} else {
|
} else {
|
||||||
result['title'].name = resData['title'].content;
|
result['title'].name = String(resData['title'].content);
|
||||||
}
|
}
|
||||||
|
|
||||||
//result['title'].url = OpenaireProperties.getsearchLinkToDataset();
|
//result['title'].url = OpenaireProperties.getsearchLinkToDataset();
|
||||||
|
|
|
@ -191,9 +191,9 @@ export class SearchOrpsService {
|
||||||
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
result['title'].name = resData['title'][0].content;
|
result['title'].name = String(resData['title'][0].content);
|
||||||
} else {
|
} else {
|
||||||
result['title'].name = resData['title'].content;
|
result['title'].name = String(resData['title'].content);
|
||||||
}
|
}
|
||||||
|
|
||||||
//result['title'].url = OpenaireProperties.getsearchLinkToOrp();
|
//result['title'].url = OpenaireProperties.getsearchLinkToOrp();
|
||||||
|
|
|
@ -219,11 +219,11 @@ export class SearchPublicationsService {
|
||||||
|
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
// resData['title'][0].hasOwnProperty("content") {
|
// resData['title'][0].hasOwnProperty("content") {
|
||||||
result['title'].name = resData['title'][0].content;
|
result['title'].name = String(resData['title'][0].content);
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
// resData['title'].hasOwnProperty("content") {
|
// resData['title'].hasOwnProperty("content") {
|
||||||
result['title'].name = resData['title'].content;
|
result['title'].name = String(resData['title'].content);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,9 +203,9 @@ export class SearchSoftwareService {
|
||||||
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
result['title'].name = resData['title'][0].content;
|
result['title'].name = String(resData['title'][0].content);
|
||||||
} else {
|
} else {
|
||||||
result['title'].name = resData['title'].content;
|
result['title'].name = String(resData['title'].content);
|
||||||
}
|
}
|
||||||
|
|
||||||
//result['title'].url = OpenaireProperties.getsearchLinkToSoftware();
|
//result['title'].url = OpenaireProperties.getsearchLinkToSoftware();
|
||||||
|
|
Loading…
Reference in New Issue