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 {
linkEvents (item) {
let events = {};
if (item.emit) {
events.click = () => {
events.click = (e) => {
e.preventDefault();
this.$emit.apply(this, [item.emit].concat(item.emitArguments));
this.close();
};
......
......@@ -46,7 +46,12 @@ export default {
mounted() {
if (this.canEdit) {
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({
id: 2,
label: this.block.attributes.visible
......@@ -66,7 +71,7 @@ export default {
id: 9,
label: this.$gettext('Block löschen'),
icon: 'trash',
emit: 'deleteBlock'
emit: 'deleteBlock',
});
}
......
<template>
<a href="#" @click="addBlock">
<a href="#" @click.prevent="addBlock">
<div class="cw-blockadder-item" :class="['cw-blockadder-item-' + type]">
<header class="cw-blockadder-item-title">
{{ title }}
......
<template>
<a href="#" @click="addContainer">
<a href="#" @click.prevent="addContainer">
<div class="cw-blockadder-item" :class="['cw-blockadder-item-' + type]">
<header class="cw-blockadder-item-title">
{{ title }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment