diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-05-14 01:06:46 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-05-14 01:06:46 +0300 |
commit | 9c6cd51ca720502cc993451505f95a43ef16a707 (patch) | |
tree | 697e686168f41fef0da5903722bbda98e17d0ff0 | |
parent | 2f33e3a76be0c58d07e628a48d8d32db46e6127c (diff) | |
parent | ea74a34d72fb0f33909858a640dbcd3a5fda5b7f (diff) | |
download | wekan-9c6cd51ca720502cc993451505f95a43ef16a707.tar.gz wekan-9c6cd51ca720502cc993451505f95a43ef16a707.tar.bz2 wekan-9c6cd51ca720502cc993451505f95a43ef16a707.zip |
Merge branch 'marc1006-fixes'
58 files changed, 240 insertions, 77 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9860b3..c90ff173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ and adds the following translations: and fixes the following bugs: +- [Fix Deleting linked card makes board not load](https://github.com/wekan/wekan/issues/2785). + Thanks to marc1006 and xet7. - [Fix getStartDayOfWeek once again](https://github.com/wekan/wekan/pull/3061). Thanks to marc1006. - [Fix shortcuts list and support card shortcuts when hovering diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 7dcadfe3..441068b0 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -956,7 +956,23 @@ 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: Maybe later we can list where the linked cards are. + // Now here is popup with a hint that the card cannot be deleted + // as there are linked cards. + // Related: + // client/components/lists/listHeader.js about line 248 + // https://github.com/wekan/wekan/issues/2785 + const message = `${TAPi18n.__( + 'delete-linked-card-before-this-card', + )} linkedId: ${ + this._id + } at client/components/cards/cardDetails.js and https://github.com/wekan/wekan/issues/2785`; + alert(message); + } Utils.goBoardId(this.boardId); }), 'change .js-field-parent-board'(event) { diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index e0b3a66c..2d913aa9 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -658,10 +658,7 @@ BlazeComponent.extendComponent({ _id = element.copy(this.boardId, this.swimlaneId, this.listId); // 1.B Linked card } else { - delete element._id; - element.type = 'cardType-linkedCard'; - element.linkedId = element.linkedId || element._id; - _id = Cards.insert(element); + _id = element.link(this.boardId, this.swimlaneId, this.listId); } Filter.addException(_id); // List insertion @@ -675,7 +672,7 @@ BlazeComponent.extendComponent({ element.sort = Boards.findOne(this.boardId) .swimlanes() .count(); - element.type = 'swimlalne'; + element.type = 'swimlane'; _id = element.copy(this.boardId); } else if (this.isBoardTemplateSearch) { board = Boards.findOne(element.linkedId); diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index 46dbd748..7cd4309f 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -223,8 +223,35 @@ BlazeComponent.extendComponent({ Template.listMorePopup.events({ 'click .js-delete': Popup.afterConfirm('listDelete', function() { Popup.close(); - this.allCards().map(card => Cards.remove(card._id)); - Lists.remove(this._id); + // TODO how can we avoid the fetch call? + const allCards = this.allCards().fetch(); + const allCardIds = _.pluck(allCards, '_id'); + // it's okay if the linked cards are on the same list + if ( + Cards.find({ + $and: [ + { listId: { $ne: this._id } }, + { linkedId: { $in: allCardIds } }, + ], + }).count() === 0 + ) { + allCardIds.map(_id => Cards.remove(_id)); + Lists.remove(this._id); + } else { + // TODO: Figure out more informative message. + // Popup with a hint that the list cannot be deleted as there are + // linked cards. We can adapt the query above so we can list the linked + // cards. + // Related: + // client/components/cards/cardDetails.js about line 969 + // https://github.com/wekan/wekan/issues/2785 + const message = `${TAPi18n.__( + 'delete-linked-cards-before-this-list', + )} linkedId: ${ + this._id + } at client/components/lists/listHeader.js and https://github.com/wekan/wekan/issues/2785`; + alert(message); + } Utils.goBoardId(this.boardId); }), }); diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 2efcb133..b6c6b005 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/bg.i18n.json b/i18n/bg.i18n.json index 73531b1e..ef9f3db2 100644 --- a/i18n/bg.i18n.json +++ b/i18n/bg.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index 446846db..3bedebec 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index 574ee564..847ebfe2 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index 99cabc15..8a8e96ae 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/da.i18n.json b/i18n/da.i18n.json index edf44408..09ed4d07 100644 --- a/i18n/da.i18n.json +++ b/i18n/da.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index 74299ecd..8dce8a96 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/el.i18n.json b/i18n/el.i18n.json index 9c20ec95..ccd18ef9 100644 --- a/i18n/el.i18n.json +++ b/i18n/el.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 0b7ae920..9049f7bf 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index d7105b78..991ea7c1 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index 0bc0857a..dd5104a2 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/es-AR.i18n.json b/i18n/es-AR.i18n.json index 80ce86fb..836d57cb 100644 --- a/i18n/es-AR.i18n.json +++ b/i18n/es-AR.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/es-CL.i18n.json b/i18n/es-CL.i18n.json index e3b911b3..2df918fe 100644 --- a/i18n/es-CL.i18n.json +++ b/i18n/es-CL.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index e58ea511..4258a5a7 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index a5a39c8d..bbb21665 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index 935f46e3..861cff8d 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 82320c8c..1ebab3a0 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Viimeksi muokattu", "last-activity": "Viimeisin toiminta", "voting": "Äänestys", - "archived": "Arkistoitu" + "archived": "Arkistoitu", + "delete-linked-card-before-this-card": "Et voi poistaa tätä korttia ennenkuin ensin poistat linkitetyn kortin jolla on", + "delete-linked-cards-before-this-list": "Et voi poistaa tätä listaa ennenkuin poistat linkitetyt kortit jotka osoittavat kortteihin tässä listassa" } diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 86e66a3f..26e5a74e 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Dernière modification le", "last-activity": "Dernière activité", "voting": "Vote", - "archived": "Archivé" + "archived": "Archivé", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index eafe3d48..c6f52477 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index 5312c674..7ed6375d 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "שינוי אחרון ב־", "last-activity": "פעילות אחרונה", "voting": "הצבעה", - "archived": "בארכיון" + "archived": "בארכיון", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/hi.i18n.json b/i18n/hi.i18n.json index d08c9871..9cf12fdf 100644 --- a/i18n/hi.i18n.json +++ b/i18n/hi.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index 0879d08b..8cbe2fb8 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/hy.i18n.json b/i18n/hy.i18n.json index 94dd5392..54f856bd 100644 --- a/i18n/hy.i18n.json +++ b/i18n/hy.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index 75a38759..82f0d536 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ig.i18n.json b/i18n/ig.i18n.json index 7eee845b..6bbc2e2f 100644 --- a/i18n/ig.i18n.json +++ b/i18n/ig.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index 6e869740..deb9eb78 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index f25f1264..8fb834f3 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ka.i18n.json b/i18n/ka.i18n.json index 13fa2d4e..900f5bbe 100644 --- a/i18n/ka.i18n.json +++ b/i18n/ka.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json index 650f4feb..5e4c5117 100644 --- a/i18n/km.i18n.json +++ b/i18n/km.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index 6c2a82ee..6eba07be 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/lv.i18n.json b/i18n/lv.i18n.json index f7bd065c..71e7ea3b 100644 --- a/i18n/lv.i18n.json +++ b/i18n/lv.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/mk.i18n.json b/i18n/mk.i18n.json index 09aea330..314b4229 100644 --- a/i18n/mk.i18n.json +++ b/i18n/mk.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/mn.i18n.json b/i18n/mn.i18n.json index ddb89620..02fe75c6 100644 --- a/i18n/mn.i18n.json +++ b/i18n/mn.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index 92c244d4..616fe50b 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 1918ffa6..ed66a2d1 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Laatste aanpassing op", "last-activity": "Laatste activiteit", "voting": "Stemmen", - "archived": "Gearchiveerd" + "archived": "Gearchiveerd", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/oc.i18n.json b/i18n/oc.i18n.json index 7ddc1f20..c03c0746 100644 --- a/i18n/oc.i18n.json +++ b/i18n/oc.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index 74daff20..8c6380ad 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 7eaa5ec6..f0f0d86d 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -309,7 +309,7 @@ "error-board-notAMember": "Você precisa ser um membro desse quadro para fazer isto", "error-json-malformed": "Seu texto não é um JSON válido", "error-json-schema": "Seu JSON não inclui as informações no formato correto", - "error-csv-schema": "Your CSV(Comma Separated Values)/TSV (Tab Separated Values) does not include the proper information in the correct format", + "error-csv-schema": "Seu CSV(Comma Separated Values)/TSV (Tab Separated Values) não inclui a informação adequada no formato correto", "error-list-doesNotExist": "Esta lista não existe", "error-user-doesNotExist": "Este usuário não existe", "error-user-notAllowSelf": "Você não pode convidar a si mesmo", @@ -317,10 +317,10 @@ "error-username-taken": "Esse username já existe", "error-email-taken": "E-mail já está em uso", "export-board": "Exportar quadro", - "export-board-json": "Export board to JSON", - "export-board-csv": "Export board to CSV", - "export-board-tsv": "Export board to TSV", - "export-board-html": "Export board to HTML", + "export-board-json": "Exportar quadro para JSON", + "export-board-csv": "Exportar quadro para CSV", + "export-board-tsv": "Exportar quadro para TSV", + "export-board-html": "Exportar quadro para HTML", "exportBoardPopup-title": "Exportar quadro", "sort": "Ordenar", "sort-desc": "Clique para Ordenar Lista", @@ -357,16 +357,16 @@ "import-board-c": "Importar quadro", "import-board-title-trello": "Importar quadro do Trello", "import-board-title-wekan": "Importar quadro a partir de exportação prévia", - "import-board-title-csv": "Import board from CSV/TSV", + "import-board-title-csv": "Importar quadro de CSV/TSV", "from-trello": "Do Trello", "from-wekan": "A partir de exportação prévia", - "from-csv": "From CSV/TSV", + "from-csv": "De CSV/TSV", "import-board-instruction-trello": "No seu quadro do Trello, vá em 'Menu', depois em 'Mais', 'Imprimir e Exportar', 'Exportar JSON', então copie o texto emitido", - "import-board-instruction-csv": "Paste in your Comma Separated Values(CSV)/ Tab Separated Values (TSV) .", + "import-board-instruction-csv": "Cole seu Comma Separated Values(CSV)/ Tab Separated Values (TSV) .", "import-board-instruction-wekan": "Em seu quadro vá para 'Menu', depois 'Exportar quadro' e copie o texto no arquivo baixado.", "import-board-instruction-about-errors": "Se você receber erros ao importar o quadro, às vezes a importação ainda funciona e o quadro está na página Todos os Quadros.", "import-json-placeholder": "Cole seus dados JSON válidos aqui", - "import-csv-placeholder": "Paste your valid CSV/TSV data here", + "import-csv-placeholder": "Cole aqui os dados válidos de seu CSV/TSV", "import-map-members": "Mapear membros", "import-members-map": "Seu quadro importado possui alguns membros. Por favor, mapeie os membros que você deseja importar para seus usuários", "import-show-user-mapping": "Revisar mapeamento dos membros", @@ -399,7 +399,7 @@ "swimlaneActionPopup-title": "Ações de Raia", "swimlaneAddPopup-title": "Adicionar uma Raia abaixo", "listImportCardPopup-title": "Importe um cartão do Trello", - "listImportCardsTsvPopup-title": "Import Excel CSV/TSV", + "listImportCardsTsvPopup-title": "Importar Excel CSV/TSV", "listMorePopup-title": "Mais", "link-list": "Vincular a esta lista", "list-delete-pop": "Todas as ações serão excluidas da lista de atividades e você não poderá recuperar a lista. Não há como desfazer.", @@ -799,10 +799,12 @@ "saturday": "Sábado", "sunday": "Domingo", "status": "Status", - "swimlane": "Swimlane", - "owner": "Owner", - "last-modified-at": "Last modified at", - "last-activity": "Last activity", - "voting": "Voting", - "archived": "Archived" + "swimlane": "Raia", + "owner": "Proprietário", + "last-modified-at": "Última modificação em", + "last-activity": "Última atividade", + "voting": "Votação", + "archived": "Arquivado", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json index 7b5367c5..5045759b 100644 --- a/i18n/pt.i18n.json +++ b/i18n/pt.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index 8552aa8e..7a15976f 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 5cfedabf..8e28497f 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -320,7 +320,7 @@ "export-board-json": "Экспортировать доску в JSON", "export-board-csv": "Экспортировать доску в CSV", "export-board-tsv": "Экспортировать доску в TSV", - "export-board-html": "Export board to HTML", + "export-board-html": "Экспортировать доску в HTML", "exportBoardPopup-title": "Экспортировать доску", "sort": "Сортировать", "sort-desc": "Нажмите, чтобы отсортировать список", @@ -804,5 +804,7 @@ "last-modified-at": "Последний раз изменено", "last-activity": "Последние действия", "voting": "Голосование", - "archived": "Архивировано" + "archived": "Архивировано", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/sl.i18n.json b/i18n/sl.i18n.json index 89949d74..bbd3ce1c 100644 --- a/i18n/sl.i18n.json +++ b/i18n/sl.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index 8d79a9f1..cc8694ee 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index 7fa41a1e..fec61ca7 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Senast ändrad", "last-activity": "Senaste aktivitet", "voting": "Röstning", - "archived": "Arkiverad" + "archived": "Arkiverad", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/sw.i18n.json b/i18n/sw.i18n.json index e6423f30..80046204 100644 --- a/i18n/sw.i18n.json +++ b/i18n/sw.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index 2d5dd034..f56e9a91 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index c2651ef7..fc48f428 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index 1ac9367a..b30a9a11 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index b919bde1..514a2dde 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index 28dfc4d1..daa090f3 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index a5437bcf..7c9b8f44 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/zh-HK.i18n.json b/i18n/zh-HK.i18n.json index 0838a357..2324c3f0 100644 --- a/i18n/zh-HK.i18n.json +++ b/i18n/zh-HK.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index de5df213..ac923fef 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -804,5 +804,7 @@ "last-modified-at": "Last modified at", "last-activity": "Last activity", "voting": "Voting", - "archived": "Archived" + "archived": "Archived", + "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" } diff --git a/models/cards.js b/models/cards.js index 223677f1..aace2647 100644 --- a/models/cards.js +++ b/models/cards.js @@ -438,6 +438,21 @@ Cards.helpers({ return _id; }, + link(boardId, swimlaneId, listId) { + // TODO is there a better method to create a deepcopy? + linkCard = JSON.parse(JSON.stringify(this)); + // TODO is this how it is meant to be? + linkCard.linkedId = linkCard.linkedId || linkCard._id; + linkCard.boardId = boardId; + linkCard.swimlaneId = swimlaneId; + linkCard.listId = listId; + linkCard.type = 'cardType-linkedCard'; + delete linkCard._id; + // TODO shall we copy the labels for a linked card?! + delete linkCard.labelIds; + return Cards.insert(linkCard); + }, + list() { return Lists.findOne(this.listId); }, |