Skip to content

Commit

Permalink
Item: add title for info text as well
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Jun 13, 2024
1 parent 3c61014 commit 08cfe2c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions panel/src/components/Collection/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<!-- Content -->
<div class="k-item-content">
<h3 class="k-item-title" :title="title">
<h3 class="k-item-title" :title="title(text)">
<k-link v-if="link !== false" :target="target" :to="link">
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="text ?? '–'" />
Expand All @@ -33,7 +33,7 @@
<span v-else v-html="text ?? '–'" />
</h3>
<!-- eslint-disable-next-line vue/no-v-html -->
<p v-if="info" class="k-item-info" v-html="info" />
<p v-if="info" :title="title(info)" class="k-item-info" v-html="info" />
</div>

<div
Expand Down Expand Up @@ -119,17 +119,17 @@ export default {
computed: {
hasFigure() {
return this.image !== false && this.$helper.object.length(this.image) > 0;
},
title() {
return this.$helper.string
.stripHTML(this.$helper.string.unescapeHTML(this.text))
.trim();
}
},
methods: {
onOption(event) {
this.$emit("action", event);
this.$emit("option", event);
},
title(text) {
return this.$helper.string
.stripHTML(this.$helper.string.unescapeHTML(text))
.trim();
}
}
};
Expand Down

0 comments on commit 08cfe2c

Please sign in to comment.