Skip to content

Commit

Permalink
Merge pull request NatLibFi#1393 from NatLibFi/respect-show-notation-…
Browse files Browse the repository at this point in the history
…in-autocomplete

Adjust skosmos:showNotation setting to be obeyed in autocomplete dropdown
  • Loading branch information
joelit authored Feb 9, 2023
2 parents 11b1819 + ae913a4 commit a22b389
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resource/js/docready.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ $(function() { // DOCUMENT READY
if (item.hiddenLabel && hasNonHiddenMatch[item.uri]) { return null; }
// do not show the label language when it's same or in the same subset as the ui language.
if (item.lang && (item.lang === qlang || item.lang.indexOf(qlang + '-') === 0)) { delete(item.lang); }
// do not show notation code if is not requested
if (false === window.showNotation && 'notation' in item) { delete(item.notation); }
if (item.type) {
var toBeRemoved = null;
item.typeLabel = item.type;
Expand Down

0 comments on commit a22b389

Please sign in to comment.