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"
|
||||
:drag-handle-selector="dragHandleSelector"
|
||||
@should-accept-drop="canEdit"
|
||||
@drag-start="draggingCard = true"
|
||||
@drag-end="draggingCard = false"
|
||||
@drop="($event) => onDropCard(stack.id, $event)">
|
||||
<Draggable v-for="card in cardsByStack" :key="card.id">
|
||||
<transition :appear="animate && !card.animated && (card.animated=true)"
|
||||
:appear-class="'zoom-appear-class'"
|
||||
:appear-active-class="'zoom-appear-active-class'">
|
||||
<CardItem :id="card.id" />
|
||||
<CardItem :id="card.id" :dragging="draggingCard" />
|
||||
</transition>
|
||||
</Draggable>
|
||||
</Container>
|
||||
@@ -142,6 +144,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
editing: false,
|
||||
draggingCard: false,
|
||||
copiedStack: '',
|
||||
newCardTitle: '',
|
||||
showAddCard: false,
|
||||
|
||||
@@ -106,6 +106,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
dragging: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -154,6 +158,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
openCard() {
|
||||
if (this.dragging) {
|
||||
return
|
||||
}
|
||||
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(() => {})
|
||||
},
|
||||
@@ -171,6 +178,9 @@ export default {
|
||||
this.editing = false
|
||||
},
|
||||
applyLabelFilter(label) {
|
||||
if (this.dragging) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] }))
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user