Skip to content
Snippets Groups Projects
Commit 9c565203 authored by Ron Lucke's avatar Ron Lucke Committed by Elmar Ludwig
Browse files

fix #781

parent 42315a9e
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,8 @@ export default { ...@@ -60,7 +60,8 @@ export default {
linkEvents (item) { linkEvents (item) {
let events = {}; let events = {};
if (item.emit) { if (item.emit) {
events.click = () => { events.click = (e) => {
e.preventDefault();
this.$emit.apply(this, [item.emit].concat(item.emitArguments)); this.$emit.apply(this, [item.emit].concat(item.emitArguments));
this.close(); this.close();
}; };
......
...@@ -46,7 +46,12 @@ export default { ...@@ -46,7 +46,12 @@ export default {
mounted() { mounted() {
if (this.canEdit) { if (this.canEdit) {
if (!this.deleteOnly) { if (!this.deleteOnly) {
this.menuItems.push({ id: 1, label: this.$gettext('Block bearbeiten'), icon: 'edit', emit: 'editBlock' }); this.menuItems.push({
id: 1,
label: this.$gettext('Block bearbeiten'),
icon: 'edit',
emit: 'editBlock',
});
this.menuItems.push({ this.menuItems.push({
id: 2, id: 2,
label: this.block.attributes.visible label: this.block.attributes.visible
...@@ -66,7 +71,7 @@ export default { ...@@ -66,7 +71,7 @@ export default {
id: 9, id: 9,
label: this.$gettext('Block löschen'), label: this.$gettext('Block löschen'),
icon: 'trash', icon: 'trash',
emit: 'deleteBlock' emit: 'deleteBlock',
}); });
} }
......
<template> <template>
<a href="#" @click="addBlock"> <a href="#" @click.prevent="addBlock">
<div class="cw-blockadder-item" :class="['cw-blockadder-item-' + type]"> <div class="cw-blockadder-item" :class="['cw-blockadder-item-' + type]">
<header class="cw-blockadder-item-title"> <header class="cw-blockadder-item-title">
{{ title }} {{ title }}
......
<template> <template>
<a href="#" @click="addContainer"> <a href="#" @click.prevent="addContainer">
<div class="cw-blockadder-item" :class="['cw-blockadder-item-' + type]"> <div class="cw-blockadder-item" :class="['cw-blockadder-item-' + type]">
<header class="cw-blockadder-item-title"> <header class="cw-blockadder-item-title">
{{ title }} {{ title }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment