summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-05-14 00:22:22 +0300
committerLauri Ojansivu <x@xet7.org>2020-05-14 00:22:22 +0300
commit0a123190025062f382f6849837c8077b641cbc96 (patch)
treec4c712e6f47135a021d5218b8b4c048e91db645c /client/components/cards/cardDetails.js
parent2f33e3a76be0c58d07e628a48d8d32db46e6127c (diff)
parent9cba640120940eec45397d2daf8de573dbedf2b1 (diff)
downloadwekan-0a123190025062f382f6849837c8077b641cbc96.tar.gz
wekan-0a123190025062f382f6849837c8077b641cbc96.tar.bz2
wekan-0a123190025062f382f6849837c8077b641cbc96.zip
Merge branch 'fixes' of https://github.com/marc1006/wekan into marc1006-fixes
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 7dcadfe3..048a7e1a 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -956,7 +956,12 @@ BlazeComponent.extendComponent({
},
'click .js-delete': Popup.afterConfirm('cardDelete', function() {
Popup.close();
- Cards.remove(this._id);
+ // verify that there are no linked cards
+ if (Cards.find({ linkedId: this._id }).count() === 0) {
+ Cards.remove(this._id);
+ } else {
+ // TODO popup...
+ }
Utils.goBoardId(this.boardId);
}),
'change .js-field-parent-board'(event) {