bug fix
This commit is contained in:
@@ -253,6 +253,7 @@ section[role="main-content"]{
|
|||||||
@include title1black;
|
@include title1black;
|
||||||
}
|
}
|
||||||
aside.index-tooltip{
|
aside.index-tooltip{
|
||||||
|
z-index:10;
|
||||||
margin-top: -1.75em;
|
margin-top: -1.75em;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
},
|
},
|
||||||
parseLinks () {
|
parseLinks () {
|
||||||
let links = this.html.match(/<a[^<]+<\/a>/g)
|
let links = this.html.match(/<a[^<]+<\/a>/g)
|
||||||
// console.log('links', links)
|
console.log('links', links)
|
||||||
if (links) {
|
if (links) {
|
||||||
// let domparser = new DOMParser()
|
// let domparser = new DOMParser()
|
||||||
// let domlink
|
// let domlink
|
||||||
@@ -51,36 +51,23 @@ export default {
|
|||||||
let index = null
|
let index = null
|
||||||
for (var i = 0; i < links.length; i++) {
|
for (var i = 0; i < links.length; i++) {
|
||||||
// console.log(`link ${i}:`, links[i])
|
// console.log(`link ${i}:`, links[i])
|
||||||
linkparts = RegExp(/<a class="(.+)" href="(.+)">(.+)<\/a>/g).exec(links[i], 'g')
|
linkparts = RegExp(/<a class="(.+)" href="(.+)" data-index="(.+)">(.+)<\/a>/g).exec(links[i], 'g')
|
||||||
// console.log('linkparts', linkparts)
|
index = linkparts[3]
|
||||||
switch (linkparts[1]) {
|
uuid = linkparts[2].replace('#', '')
|
||||||
case 'persName':
|
newlink = `<a` +
|
||||||
index = 'nominum'
|
` class="${linkparts[1]} active-link"` +
|
||||||
break
|
` data-index="${index}"` +
|
||||||
case 'placeName':
|
` data-uuid="${uuid}"` +
|
||||||
index = 'locorum'
|
` href="/${index}/${uuid}"` +
|
||||||
break
|
` @click.prevent="onClickRef"` +
|
||||||
case 'objectName':
|
` @keyup.enter="onClickRef"` +
|
||||||
index = 'operum'
|
` @mouseover="onHoverLink"` +
|
||||||
break
|
` @mouseleave="onLeaveLink"` +
|
||||||
}
|
`>${linkparts[4]}` +
|
||||||
if (index) {
|
`<sup class="mdi mdi-message-text-outline" />` +
|
||||||
uuid = linkparts[2].replace('#', '')
|
`</a>`
|
||||||
newlink = `<a` +
|
// console.log('newlink', newlink)
|
||||||
` class="${linkparts[1]} active-link"` +
|
this.html = this.html.replace(links[i], newlink)
|
||||||
` data-index="${index}"` +
|
|
||||||
` data-uuid="${uuid}"` +
|
|
||||||
` href="/${index}/${uuid}"` +
|
|
||||||
` @click.prevent="onClickRef"` +
|
|
||||||
` @keyup.enter="onClickRef"` +
|
|
||||||
` @mouseover="onHoverLink"` +
|
|
||||||
` @mouseleave="onLeaveLink"` +
|
|
||||||
`>${linkparts[3]}` +
|
|
||||||
`<sup class="mdi mdi-message-text-outline" />` +
|
|
||||||
`</a>`
|
|
||||||
// console.log('newlink', newlink)
|
|
||||||
this.html = this.html.replace(links[i], newlink)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// console.log('this.html', this.html)
|
// console.log('this.html', this.html)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export default {
|
|||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
ocAsArray (oc) {
|
ocAsArray (oc) {
|
||||||
|
// not necesseary anymore (KB #758)
|
||||||
console.log('Array.isArray(oc)', Array.isArray(oc))
|
console.log('Array.isArray(oc)', Array.isArray(oc))
|
||||||
return Array.isArray(oc) ? oc : [oc]
|
return Array.isArray(oc) ? oc : [oc]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,13 +14,16 @@
|
|||||||
<span v-if="indexitem == 'loading'">Loading ...</span>
|
<span v-if="indexitem == 'loading'">Loading ...</span>
|
||||||
<template v-if="indexitem !== 'loading'">
|
<template v-if="indexitem !== 'loading'">
|
||||||
<h1 v-html="indexitem.title" />
|
<h1 v-html="indexitem.title" />
|
||||||
<p class="birthdeath">
|
<p v-if="indexitem.birthDate" class="birthdeath">
|
||||||
<time>{{ indexitem.birthDate }}</time>, <span class="place">{{ indexitem.birthPlace }}</span><br>
|
<time>{{ indexitem.birthDate }}</time>, <span class="place">{{ indexitem.birthPlace }}</span><br>
|
||||||
<time>{{ indexitem.deathDate }}</time>, <span class="place">{{ indexitem.deathPlace }}</span>
|
<time>{{ indexitem.deathDate }}</time>, <span class="place">{{ indexitem.deathPlace }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="occupation">
|
<p v-if="indexitem.occupation" class="occupation">
|
||||||
{{ indexitem.occupation }}
|
{{ indexitem.occupation }}
|
||||||
</p>
|
</p>
|
||||||
|
<p v-if="indexitem.type" class="type">
|
||||||
|
{{ indexitem.type }}
|
||||||
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
Reference in New Issue
Block a user