Skip to content

Commit

Permalink
Merge branch 'hotfix/1.24.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
oBlissing committed Dec 7, 2021
2 parents f9d6c90 + 38d844a commit 6fcc56f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 25 deletions.
27 changes: 14 additions & 13 deletions lxljs/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,23 @@ function formatLabel(item, resources) {
const key = objKeys[i];
const value = item[key];

if (i > 0 && value.length > 0) {
label.push(' • ');
}

const formatter = formatters ? formatters[`${key}-format`] : null;
if (isArray(value)) {
if (formatter && formatter['fresnel:valueFormat'] && formatter['fresnel:valueFormat']['fresnel:contentAfter']) {
label.push(value.join(formatter['fresnel:valueFormat']['fresnel:contentAfter']));
if (formatter['fresnel:contentLast']) {
label.push(formatter['fresnel:contentLast']);
if (value != null) {
if (i > 0 && value.length > 0) {
label.push(' • ');
}
const formatter = formatters ? formatters[`${key}-format`] : null;
if (isArray(value)) {
if (formatter && formatter['fresnel:valueFormat'] && formatter['fresnel:valueFormat']['fresnel:contentAfter']) {
label.push(value.join(formatter['fresnel:valueFormat']['fresnel:contentAfter']));
if (formatter['fresnel:contentLast']) {
label.push(formatter['fresnel:contentLast']);
}
} else {
label.push(value.join(', '));
}
} else {
label.push(value.join(', '));
label.push(value);
}
} else {
label.push(value);
}
}
return label.join(''); // Join without any extra separators
Expand Down
2 changes: 1 addition & 1 deletion lxljs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lxljs",
"version": "1.0.0",
"version": "1.0.1",
"description": "JavaScript tools for the Libris XL infrastructure.",
"main": "index.js",
"author": "Ola Blissing <[email protected]>",
Expand Down
5 changes: 4 additions & 1 deletion nuxt-app/components/ResultItem.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="ResultItem" :class="{ 'hovered': hovered, 'expanded': expanded }" @mouseover="hovered = true" @mouseout="hovered = false">
<div class="ResultItem-header" :class="{ 'cursor-pointer': !forceExpanded }" @click="toggle" @keyup.enter="toggle(true)" tabindex="0">
<span class="ResultItem-title" :class="{'as-header': isDocumentView }">
<span class="ResultItem-title" :class="{'as-header': isDocumentView || isVocabIndex }">
<template v-if="!forceExpanded">
<i class="bi bi-chevron-right" v-if="!expanded"></i>
<i class="bi bi-chevron-down" v-if="expanded"></i>
Expand Down Expand Up @@ -59,6 +59,9 @@ export default {
isDocumentView() {
return this.$route.name == 'all' || this.$route.name == 'vocab-term';
},
isVocabIndex() {
return this.$route.name == 'vocab';
},
isVocabTerm() {
const type = this.entityData['@type'];
return type === 'Property' || type === 'Class' || type === 'DatatypeProperty';
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "id.kb.se",
"version": "2.0.0",
"version": "2.0.1",
"license": "Apache-2.0",
"private": true,
"scripts": {
Expand Down
7 changes: 0 additions & 7 deletions nuxt-app/pages/vocab/index.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<template>
<div>
<div class="Vocab-termDetails">
<h1>{{ translateUi('Vocabulary') }}</h1>
<p v-if="settings.language == 'sv'">Välj en term i listan för att se detaljer.</p>
<p v-else>
Choose a term in the list to see details.
</p>
</div>
<div class="Vocab-termDetails">
<ResultItem :entity="termDataOntology" :force-expanded="true" :show-download="false" :show-other-services="false" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion vue-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-client",
"version": "1.24.0",
"version": "1.24.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
2 changes: 1 addition & 1 deletion vue-client/src/components/search/facet-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
label = this.determineLabel(o.object);
}
if (!label) {
label = o.object.label
label = o.object.label;
}
label = this.$options.filters.capitalize(label);
return {
Expand Down

0 comments on commit 6fcc56f

Please sign in to comment.