Skip to content

Commit

Permalink
tree-bugfixed with comma-seperated multivocs
Browse files Browse the repository at this point in the history
  • Loading branch information
StiftungAusNachlass committed Apr 11, 2024
1 parent d3095a6 commit 521fd8e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/webfrontend/CustomDataTypeDante.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ class CustomDataTypeDANTE extends CustomDataTypeWithCommons
else
# else get first voc from given voclist (1-n)
vocParameter = that.getActiveVocabularyName(cdata, opts)
vocParameter = vocParameter.replace /,/g, "|"
vocParameter = vocParameter.split('|')
vocParameter = vocParameter[0]

Expand Down Expand Up @@ -1364,14 +1365,15 @@ class CustomDataTypeDANTE extends CustomDataTypeWithCommons
value: that.getVocabularyNameFromDatamodel(opts)
)
select_items.push item
# add vocs to select
for entry, key in data
item = (
text: entry.prefLabel.de
value: entry.notation[0]
)
select_items.push item

# add vocs to select, keep sorting from parameter
for vocEntry, vocKey in vocTestArr
for entry, key in data
if vocEntry == entry.notation[0]
item = (
text: entry.prefLabel.de
value: entry.notation[0]
)
select_items.push item
thisSelect.enable()
dfr.resolve(select_items)
)
Expand Down

0 comments on commit 521fd8e

Please sign in to comment.