refs #2594 prevent opening card and applyLabelFilter on card drag end
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
e7c15b6154
commit
2537aaa6ea
@@ -99,12 +99,14 @@
|
|||||||
non-drag-area-selector=".dragDisabled"
|
non-drag-area-selector=".dragDisabled"
|
||||||
:drag-handle-selector="dragHandleSelector"
|
:drag-handle-selector="dragHandleSelector"
|
||||||
@should-accept-drop="canEdit"
|
@should-accept-drop="canEdit"
|
||||||
|
@drag-start="draggingCard = true"
|
||||||
|
@drag-end="draggingCard = false"
|
||||||
@drop="($event) => onDropCard(stack.id, $event)">
|
@drop="($event) => onDropCard(stack.id, $event)">
|
||||||
<Draggable v-for="card in cardsByStack" :key="card.id">
|
<Draggable v-for="card in cardsByStack" :key="card.id">
|
||||||
<transition :appear="animate && !card.animated && (card.animated=true)"
|
<transition :appear="animate && !card.animated && (card.animated=true)"
|
||||||
:appear-class="'zoom-appear-class'"
|
:appear-class="'zoom-appear-class'"
|
||||||
:appear-active-class="'zoom-appear-active-class'">
|
:appear-active-class="'zoom-appear-active-class'">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" :dragging="draggingCard" />
|
||||||
</transition>
|
</transition>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -142,6 +144,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editing: false,
|
editing: false,
|
||||||
|
draggingCard: false,
|
||||||
copiedStack: '',
|
copiedStack: '',
|
||||||
newCardTitle: '',
|
newCardTitle: '',
|
||||||
showAddCard: false,
|
showAddCard: false,
|
||||||
|
|||||||
@@ -106,6 +106,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
dragging: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -154,6 +158,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openCard() {
|
openCard() {
|
||||||
|
if (this.dragging) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const boardId = this.card && this.card.boardId ? this.card.boardId : this.$route.params.id
|
const boardId = this.card && this.card.boardId ? this.card.boardId : this.$route.params.id
|
||||||
this.$router.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {})
|
this.$router.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {})
|
||||||
},
|
},
|
||||||
@@ -171,6 +178,9 @@ export default {
|
|||||||
this.editing = false
|
this.editing = false
|
||||||
},
|
},
|
||||||
applyLabelFilter(label) {
|
applyLabelFilter(label) {
|
||||||
|
if (this.dragging) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] }))
|
this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] }))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user