Skip to content
Snippets Groups Projects
Verified Commit 03592842 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Show ID also for elements which come later.

parent 81bddb51
No related branches found
No related tags found
2 merge requests!68DOC: update CHANGELOG,!64ENH: Add entity ids to label
Pipeline #18169 passed
......@@ -285,6 +285,7 @@ h5 {
.caosdb-label-id {
margin-right: 0.3em;
display: none;
}
.caosdb-label-name {
......
......@@ -4,8 +4,10 @@
*
* Copyright (C) 2018 Research Group Biomedical Physics,
* Max-Planck-Institute for Dynamics and Self-Organization Göttingen
* Copyright (C) 2019 IndiScale GmbH (info@indiscale.com)
* Copyright (C) 2019 Timm Fitschen (t.fitschen@indiscale.com)
* Copyright (C) 2022 IndiScale GmbH <info@indiscale.com>
* Copyright (C) 2019 Timm Fitschen <t.fitschen@indiscale.com>
* Copyright (C) 2022 Florian Spreckelsen <f.spreckelsen@indiscale.com>
* Copyright (C) 2022 Daniel Hornung <d.hornung@indiscale.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
......@@ -1961,7 +1963,11 @@ function initOnDocumentReady() {
}
if ("${BUILD_MODULE_SHOW_ID_IN_LABEL}" == "ENABLED") {
$('.caosdb-label-id').toggleClass('d-none');
// Remove the "display: none;" rule from the caosdb-label-id class
[...document.styleSheets]
.map(s => {return [...s.cssRules].find(x=> x.selectorText=='.caosdb-label-id')})
.filter(Boolean)
.forEach( rule => rule.style.removeProperty("display"));
}
}
......
......@@ -5,6 +5,10 @@
*
* Copyright (C) 2018 Research Group Biomedical Physics,
* Max-Planck-Institute for Dynamics and Self-Organization Göttingen
* Copyright (C) 2022 Indiscale GmbH <info@indiscale.com>
* Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
* Copyright (C) 2022 Florian Spreckelsen <f.spreckelsen@indiscale.com>
* Copyright (C) 2022 Daniel Hornung <d.hornung@indiscale.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
......@@ -150,7 +154,7 @@
<xsl:attribute name="href">
<xsl:value-of select="concat($entitypath, @id)"/>
</xsl:attribute>
<span class="caosdb-label-id d-none"><xsl:value-of select="@id"/></span>
<span class="caosdb-label-id"><xsl:value-of select="@id"/></span>
<span class="caosdb-label-name">
<xsl:value-of select="@name"/>
</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment