Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
5b3b7c5c
Commit
5b3b7c5c
authored
4 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Problems with retrieving heading attributes with active preview.
parent
14efe71e
No related branches found
No related tags found
2 merge requests
!90
F citation cff
,
!33
Draft: F fix get parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/js/caosdb.js
+3
-3
3 additions, 3 deletions
src/core/js/caosdb.js
with
3 additions
and
3 deletions
src/core/js/caosdb.js
+
3
−
3
View file @
5b3b7c5c
...
...
@@ -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
=
e
lement
.
getElementsByClassName
(
"
caosdb-entity-heading-attr
"
)
;
var
res
=
findE
lement
ByConditions
(
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,6 @@ 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
=
[];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment