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

Biest #156

parent 706e0e1b
No related branches found
No related tags found
No related merge requests found
...@@ -1451,9 +1451,6 @@ b l o c k a d d e r ...@@ -1451,9 +1451,6 @@ b l o c k a d d e r
} }
.cw-block-adder-area { .cw-block-adder-area {
@include background-icon(add, clickable);
background-repeat: no-repeat;
background-position: calc(50% - 5em) calc(50% - 1px);
border: solid thin $content-color-40; border: solid thin $content-color-40;
padding: 1em 0; padding: 1em 0;
color: $base-color; color: $base-color;
...@@ -1465,13 +1462,11 @@ b l o c k a d d e r ...@@ -1465,13 +1462,11 @@ b l o c k a d d e r
&.cw-block-adder-active { &.cw-block-adder-active {
border: solid thin $base-color; border: solid thin $base-color;
background-color: $base-color; background-color: $base-color;
@include background-icon(add, info-alt);
color: $white; color: $white;
} }
&.cw-block-adder-disabled {
@include background-icon(add, inactive); img {
color: $dark-gray-color-80; vertical-align: text-bottom;
cursor: default;
} }
} }
.cw-block-helper-buttons { .cw-block-helper-buttons {
......
<template> <template>
<div <div
class="cw-block-adder-area" class="cw-block-adder-area"
:class="{ 'cw-block-adder-active': adderActive, 'cw-block-adder-disabled': adderDisable }" :class="{ 'cw-block-adder-active': adderActive }"
@click="selectBlockAdder" @click="selectBlockAdder"
> >
<translate>Block hinzufügen</translate> <studip-icon v-show="!adderActive" shape="add" />
<studip-icon v-show="adderActive" shape="add" role="info_alt"/>
<span v-show="!adderActive"><translate>Block zu diesem Abschnitt hinzufügen</translate></span>
<span v-show="adderActive"><translate>Abschnitt aktiv - Blöcke werden hier eingefügt</translate></span>
</div> </div>
</template> </template>
<script> <script>
import StudipIcon from '../StudipIcon.vue';
export default { export default {
components: { StudipIcon },
name: 'courseware-block-adder-area', name: 'courseware-block-adder-area',
props: { props: {
container: Object, container: Object,
...@@ -30,9 +35,6 @@ export default { ...@@ -30,9 +35,6 @@ export default {
}, },
methods: { methods: {
selectBlockAdder() { selectBlockAdder() {
if (this.adderDisable) {
return false;
}
if (this.adderActive) { if (this.adderActive) {
this.adderActive = false; this.adderActive = false;
this.$store.dispatch('coursewareBlockAdder', {}); this.$store.dispatch('coursewareBlockAdder', {});
...@@ -47,7 +49,13 @@ export default { ...@@ -47,7 +49,13 @@ export default {
adderStorage(newValue, oldValue) { adderStorage(newValue, oldValue) {
if (Object.keys(newValue).length === 0) { if (Object.keys(newValue).length === 0) {
this.adderActive = false; this.adderActive = false;
this.$emit('updateContainerContent', oldValue) this.$emit('updateContainerContent', oldValue);
} else {
if (newValue.container.id === this.container.id && newValue.section === this.section) {
this.adderActive = true;
} else {
this.adderActive = false;
}
} }
}, },
}, },
......
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