added text preview in index item's occurences list
This commit is contained in:
@@ -24,17 +24,7 @@
|
||||
v-for="oc in ed.occurences"
|
||||
:key="oc.uuid"
|
||||
> -->
|
||||
<h4>
|
||||
<a
|
||||
:href="'/edition/'+ed.item+'/'+oc.uuid"
|
||||
:uuid="oc.uuid"
|
||||
:eduuid="ed.item"
|
||||
@click.prevent="onclick"
|
||||
@keyup.enter="onclick"
|
||||
>
|
||||
{{ oc.title }}
|
||||
</a>
|
||||
</h4>
|
||||
<occurence :ed="ed" :oc="oc" />
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -43,8 +33,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Occurence from './Occurence'
|
||||
|
||||
export default {
|
||||
name: 'IndexItemOcurrences',
|
||||
components: {
|
||||
Occurence
|
||||
},
|
||||
props: {
|
||||
content: Object
|
||||
},
|
||||
@@ -56,25 +51,6 @@ export default {
|
||||
// not necesseary anymore (KB #758)
|
||||
console.log('Array.isArray(oc)', Array.isArray(oc))
|
||||
return Array.isArray(oc) ? oc : [oc]
|
||||
},
|
||||
onclick (e) {
|
||||
console.log('clicked on text occurence', e)
|
||||
if (e.target.getAttribute('eduuid')) {
|
||||
this.$router.push({
|
||||
name: `editiontext`,
|
||||
params: {
|
||||
id: e.target.getAttribute('eduuid'),
|
||||
textid: e.target.getAttribute('uuid')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: `edition`,
|
||||
params: {
|
||||
id: e.target.getAttribute('uuid')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user