mirror of
https://github.com/wekan/wekan.git
synced 2026-02-11 18:54:22 +01:00
Global Search Card Popup has now every data if the search was opened from another board
- the global search only returns the card details data needed to display the search results, but for opening the popup card details a lot more information is needed. It already worked if the data was already in the minimongo, but if not, nearly nothing was displayed
This commit is contained in:
parent
72ddd66495
commit
4733afe4eb
6 changed files with 58 additions and 9 deletions
|
|
@ -52,7 +52,22 @@ const escapeForRegex = require('escape-string-regexp');
|
|||
|
||||
Meteor.publish('card', cardId => {
|
||||
check(cardId, String);
|
||||
return Cards.find({ _id: cardId });
|
||||
const ret = Cards.find({ _id: cardId });
|
||||
return ret;
|
||||
});
|
||||
|
||||
/** publish all data which is necessary to display card details as popup
|
||||
* @returns array of cursors
|
||||
*/
|
||||
Meteor.publishRelations('popupCardData', function(cardId) {
|
||||
check(cardId, String);
|
||||
this.cursor(
|
||||
Cards.find({_id: cardId}),
|
||||
function(cardId, card) {
|
||||
this.cursor(Boards.find({_id: card.boardId}));
|
||||
},
|
||||
);
|
||||
return this.ready()
|
||||
});
|
||||
|
||||
Meteor.publish('myCards', function(sessionId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue