Skip to content

Commit

Permalink
Make sure the hierarchy nodes know their notation codes (for sorting …
Browse files Browse the repository at this point in the history
…by notation)
  • Loading branch information
osma committed Sep 15, 2021
1 parent c3c263d commit 59e5be6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conf/dev.finto.fi/footer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function createConceptObject(conceptUri, conceptData) {
text: getLabel(conceptData),
a_attr: getHrefForUri(conceptData.uri),
uri: conceptUri,
notation: conceptData.notation,
parents: conceptData.broader,
state: { opened: true },
children: []
Expand Down Expand Up @@ -78,6 +79,7 @@ function createObjectsFromChildren(conceptData, conceptUri) {
text: getLabel(conceptData.narrower[i]),
a_attr: getHrefForUri(conceptData.narrower[i].uri),
uri: conceptData.narrower[i].uri,
notation: conceptData.narrower[i].notation,
parents: conceptUri,
state: { opened: true }
};
Expand All @@ -104,6 +106,7 @@ function vocabRoot(topConcepts) {
text: conceptData.label,
a_attr : getHrefForUri(conceptData.uri),
uri: conceptData.uri,
notation: conceptData.notation,
state: { opened: false }
};
if (vocab !== 'yso' && childObject.uri.indexOf('www.yso.fi/onto/yso/') !== -1)
Expand All @@ -126,6 +129,7 @@ function createObjectsFromNarrowers(narrowerResponse) {
text : getLabel(conceptObject),
a_attr : getHrefForUri(conceptObject.uri),
uri: conceptObject.uri,
notation: conceptObject.notation,
parents: narrowerResponse.uri,
state: { opened: false, disabled: false, selected: false }
};
Expand Down
4 changes: 4 additions & 0 deletions conf/finto.fi/footer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function createConceptObject(conceptUri, conceptData) {
text: getLabel(conceptData),
a_attr: getHrefForUri(conceptData.uri),
uri: conceptUri,
notation: conceptData.notation,
parents: conceptData.broader,
state: { opened: true },
children: []
Expand Down Expand Up @@ -107,6 +108,7 @@ function createObjectsFromChildren(conceptData, conceptUri) {
text: getLabel(conceptData.narrower[i]),
a_attr: getHrefForUri(conceptData.narrower[i].uri),
uri: conceptData.narrower[i].uri,
notation: conceptData.narrower[i].notation,
parents: conceptUri,
state: { opened: true }
};
Expand All @@ -132,6 +134,7 @@ function vocabRoot(topConcepts) {
text: conceptData.label,
a_attr : getHrefForUri(conceptData.uri),
uri: conceptData.uri,
notation: conceptData.notation,
state: { opened: false }
};
if (vocab !== 'yso' && childObject.uri.indexOf('www.yso.fi/onto/yso/') !== -1)
Expand All @@ -154,6 +157,7 @@ function createObjectsFromNarrowers(narrowerResponse) {
text : getLabel(conceptObject),
a_attr : getHrefForUri(conceptObject.uri),
uri: conceptObject.uri,
notation: conceptObject.notation,
parents: narrowerResponse.uri,
state: { opened: false, disabled: false, selected: false }
};
Expand Down

0 comments on commit 59e5be6

Please sign in to comment.