add some debug styling and display notes data in content

This commit is contained in:
axolotle
2021-05-09 00:08:49 +02:00
parent b03fc048c8
commit 1ec83b318a
6 changed files with 105 additions and 18 deletions
+10 -5
View File
@@ -22,18 +22,19 @@
<b-button
v-if="text.siblings"
:id="'siblings-' + text.id"
size="sm"
>
{{ $t('siblings') }}
</b-button>
<b-popover
v-if="text.siblings"
:target="'siblings-' + text.id" triggers="click" placement="top"
:target="'siblings-' + text.id" triggers="hover" placement="top"
>
<div v-for="sibling in text.siblings" :key="sibling.id">
<h6>
<span>{{ toCommaList(sibling.authors) }},</span>
<span>{{ sibling.title }},</span>
<span>{{ sibling.edition }}</span>
<h6 @click="onSiblingOpen($event, sibling.id)" class="clickable">
<span class="text-authors d-block">{{ toCommaList(sibling.authors) }},</span>
<span class="text-title d-block">{{ sibling.title }},</span>
<span class="text-edition d-block">{{ text.edition ? text.edition.name : text.edition }}</span>
</h6>
</div>
</b-popover>
@@ -61,6 +62,10 @@ export default {
this.$emit('open', id, childId)
},
onSiblingOpen (_, id) {
this.$emit('open', id)
},
onSelfClose (e, id) {
// stop the click event propagation to avoid other listeners to interact with a soon to be deleted element.
e.stopPropagation()