Revision 55589
Added by Konstantina Galouni almost 5 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchDatasets.service.ts | ||
---|---|---|
238 | 238 |
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer |
239 | 239 |
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; |
240 | 240 |
if(!Array.isArray(resData.description)) { |
241 |
result.description = resData.description;
|
|
241 |
result.description = String(resData.description);
|
|
242 | 242 |
} else { |
243 |
result.description = resData.description[0];
|
|
243 |
result.description = String(resData.description[0]);
|
|
244 | 244 |
} |
245 | 245 |
if(result.description && result.description.length > this.sizeOfDescription) { |
246 | 246 |
result.description = result.description.substring(0, this.sizeOfDescription)+"..."; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchOrps.service.ts | ||
---|---|---|
243 | 243 |
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer |
244 | 244 |
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; |
245 | 245 |
if(!Array.isArray(resData.description)) { |
246 |
result.description = resData.description;
|
|
246 |
result.description = String(resData.description);
|
|
247 | 247 |
} else { |
248 |
result.description = resData.description[0];
|
|
248 |
result.description = String(resData.description[0]);
|
|
249 | 249 |
} |
250 | 250 |
if(result.description && result.description.length > this.sizeOfDescription) { |
251 | 251 |
result.description = result.description.substring(0, this.sizeOfDescription)+"..."; |
252 | 252 |
} |
253 | 253 |
|
254 |
result.embargoEndDate = resData.embargoenddate;
|
|
254 |
result.embargoEndDate = resData.embargoenddate; |
|
255 | 255 |
|
256 | 256 |
if(!Array.isArray(resData.publisher)) { |
257 | 257 |
result.publisher = resData.publisher; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchSoftware.service.ts | ||
---|---|---|
254 | 254 |
|
255 | 255 |
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer |
256 | 256 |
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; |
257 |
result.description = Array.isArray(resData.description) ? resData.description[0] : resData.description;
|
|
257 |
result.description = Array.isArray(resData.description) ? String(resData.description[0]) : String(resData.description);
|
|
258 | 258 |
if(result.description && result.description.length > this.sizeOfDescription) { |
259 | 259 |
result.description = result.description.substring(0, this.sizeOfDescription)+"..."; |
260 | 260 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchPublications.service.ts | ||
---|---|---|
275 | 275 |
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; |
276 | 276 |
|
277 | 277 |
if(!Array.isArray(resData.description)) { |
278 |
result.description = resData.description;
|
|
278 |
result.description = String(resData.description);
|
|
279 | 279 |
} else { |
280 |
result.description = resData.description[0];
|
|
280 |
result.description = String(resData.description[0]);
|
|
281 | 281 |
} |
282 | 282 |
|
283 | 283 |
if(result.description && result.description.length > this.sizeOfDescription) { |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/orp/orp.service.ts | ||
---|---|---|
61 | 61 |
this.orpInfo.dateofacceptance = data[0].dateofacceptance; |
62 | 62 |
this.orpInfo.publisher = data[0].publisher; |
63 | 63 |
if(!Array.isArray(data[0].description)) { |
64 |
this.orpInfo.description = data[0].description;
|
|
64 |
this.orpInfo.description = String(data[0].description);
|
|
65 | 65 |
} else { |
66 |
this.orpInfo.description = data[0].description[0];
|
|
66 |
this.orpInfo.description = String(data[0].description[0]);
|
|
67 | 67 |
} |
68 | 68 |
this.orpInfo.embargoEndDate = data[0].embargoenddate; |
69 | 69 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataset/dataset.service.ts | ||
---|---|---|
64 | 64 |
this.datasetInfo.dateofacceptance = data[0].dateofacceptance; |
65 | 65 |
this.datasetInfo.publisher = data[0].publisher; |
66 | 66 |
if(!Array.isArray(data[0].description)) { |
67 |
this.datasetInfo.description = data[0].description;
|
|
67 |
this.datasetInfo.description = String(data[0].description);
|
|
68 | 68 |
} else { |
69 |
this.datasetInfo.description = data[0].description[0];
|
|
69 |
this.datasetInfo.description = String(data[0].description[0]);
|
|
70 | 70 |
} |
71 | 71 |
this.datasetInfo.embargoEndDate = data[0].embargoenddate; |
72 | 72 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/publication/publication.service.ts | ||
---|---|---|
66 | 66 |
this.publicationInfo.dateofacceptance = data[0].dateofacceptance; |
67 | 67 |
this.publicationInfo.publisher = data[0].publisher; |
68 | 68 |
if(!Array.isArray(data[0].description)) { |
69 |
this.publicationInfo.description = data[0].description;
|
|
69 |
this.publicationInfo.description = String(data[0].description);
|
|
70 | 70 |
} else { |
71 |
this.publicationInfo.description = data[0].description[0];
|
|
71 |
this.publicationInfo.description = String(data[0].description[0]);
|
|
72 | 72 |
} |
73 | 73 |
this.publicationInfo.embargoEndDate = data[0].embargoenddate; |
74 | 74 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/software/software.service.ts | ||
---|---|---|
63 | 63 |
this.softwareInfo.dateofacceptance = data[0].dateofacceptance; |
64 | 64 |
this.softwareInfo.publisher = data[0].publisher; |
65 | 65 |
if(!Array.isArray(data[0].description)) { |
66 |
this.softwareInfo.description = data[0].description;
|
|
66 |
this.softwareInfo.description = String(data[0].description);
|
|
67 | 67 |
} else { |
68 |
this.softwareInfo.description = data[0].description[0];
|
|
68 |
this.softwareInfo.description = String(data[0].description[0]);
|
|
69 | 69 |
} |
70 | 70 |
this.softwareInfo.embargoEndDate = data[0].embargoenddate; |
71 | 71 |
} |
Also available in: Unified diff
[Trunk|Library]: Bug fix: In Landing and Search Pages for results (publ, datas, soft, orp), make description string necessarily (may be number).