summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 1c85580f..d4957964 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -20,10 +20,11 @@ BlazeComponent.extendComponent({
},
onCreated() {
+ this.currentBoard = Boards.findOne(Session.get('currentBoard'));
this.isLoaded = new ReactiveVar(false);
const boardBody = this.parentComponent().parentComponent();
//in Miniview parent is Board, not BoardBody.
- if (boardBody !== null){
+ if (boardBody !== null) {
boardBody.showOverlay.set(true);
boardBody.mouseHasEnterCardDetails = false;
}
@@ -78,6 +79,22 @@ BlazeComponent.extendComponent({
return result;
},
+ linkForCard() {
+ const card = this.currentData();
+ let result = '#';
+ if (card) {
+ const board = Boards.findOne(card.boardId);
+ if (board) {
+ result = FlowRouter.url('card', {
+ boardId: card.boardId,
+ slug: board.slug,
+ cardId: card._id,
+ });
+ }
+ }
+ return result;
+ },
+
onRendered() {
if (!Utils.isMiniScreen()) this.scrollParentContainer();
const $checklistsDom = this.$('.card-checklist-items');