2021-01-13 21:46:18 +02:00
|
|
|
Template.resultCard.helpers({
|
|
|
|
|
userId() {
|
|
|
|
|
return Meteor.userId();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
BlazeComponent.extendComponent({
|
2021-10-21 13:34:36 +02:00
|
|
|
clickOnMiniCard(evt) {
|
|
|
|
|
evt.preventDefault();
|
2021-11-08 11:47:41 +01:00
|
|
|
const this_ = this;
|
|
|
|
|
const cardId = this.currentData()._id;
|
|
|
|
|
const boardId = this.currentData().boardId;
|
|
|
|
|
Meteor.subscribe('popupCardData', cardId, {
|
|
|
|
|
onReady() {
|
2021-11-08 11:55:14 +01:00
|
|
|
Session.set('popupCardId', cardId);
|
2021-11-08 11:47:41 +01:00
|
|
|
Session.set('popupCardBoardId', boardId);
|
|
|
|
|
this_.cardDetailsPopup(evt);
|
|
|
|
|
},
|
|
|
|
|
});
|
2021-10-21 13:34:36 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cardDetailsPopup(event) {
|
|
|
|
|
if (!Popup.isOpen()) {
|
|
|
|
|
Popup.open("cardDetails")(event);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2021-01-13 21:46:18 +02:00
|
|
|
events() {
|
2021-10-21 13:34:36 +02:00
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
'click .js-minicard': this.clickOnMiniCard,
|
|
|
|
|
},
|
|
|
|
|
];
|
2021-01-13 21:46:18 +02:00
|
|
|
},
|
|
|
|
|
}).register('resultCard');
|