Skip to content
Snippets Groups Projects

F citation cff

Closed Alexander Schlemmer requested to merge f-citation-cff into dev
2 files
+ 30
3
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
3
@@ -404,12 +404,13 @@ function getIDfromHREF(el) {
/**
* Return an entity heading attribute from an element.
*
* @param element The element holding the entity.
* @return The value of the entity heading attribute or undefined if it is not present.
*/
function getEntityHeadingAttribute(element, attribute_name) {
var res = element.getElementsByClassName("caosdb-entity-heading-attr");
var res = findElementByConditions(element, x => x.classList.contains("caosdb-entity-heading-attr"),
x => x.classList.contains("caosdb-preview-container"));
for (var i = 0; i < res.length; i++) {
var subres = res[i].getElementsByClassName("caosdb-entity-heading-attr-name");
if (subres.length != 1) {
@@ -444,7 +445,8 @@ function getEntityDescription(element) {
* @return A list of objects with name and id of the parents.
*/
function getParents(element) {
var res = element.getElementsByClassName("caosdb-parent-name");
var res = findElementByConditions(element, x => x.classList.contains("caosdb-parent-name"),
x => x.classList.contains("caosdb-preview-container"));
var list = [];
for (var i = 0; i < res.length; i++) {
list.push({
Loading