summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardList.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-23 22:00:02 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-25 18:07:04 +0200
commit9bea6a52d32c843d277640e42785a8faac583a63 (patch)
tree8ad09ce9020d4f147095a572ba384c217259de62 /client/components/boards/boardList.js
parentf03fee5162bf8151c60c09fde2e983a5d5dc18ca (diff)
downloadwekan-9bea6a52d32c843d277640e42785a8faac583a63.tar.gz
wekan-9bea6a52d32c843d277640e42785a8faac583a63.tar.bz2
wekan-9bea6a52d32c843d277640e42785a8faac583a63.zip
Fix the stars
Fixes #214
Diffstat (limited to 'client/components/boards/boardList.js')
-rw-r--r--client/components/boards/boardList.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/client/components/boards/boardList.js b/client/components/boards/boardList.js
index f902cc84..e86d16ab 100644
--- a/client/components/boards/boardList.js
+++ b/client/components/boards/boardList.js
@@ -9,25 +9,17 @@ BlazeComponent.extendComponent({
});
},
- starredBoards: function() {
- var cursor = Boards.find({
- _id: { $in: Meteor.user().profile.starredBoards || [] }
- }, {
- sort: ['title']
- });
- return cursor.count() === 0 ? null : cursor;
- },
-
isStarred: function() {
var user = Meteor.user();
- return user && user.hasStarred(this._id);
+ return user && user.hasStarred(this.currentData()._id);
},
events: function() {
return [{
'click .js-add-board': Popup.open('createBoard'),
'click .js-star-board': function(evt) {
- Meteor.user().toggleBoardStar(this._id);
+ var boardId = this.currentData()._id;
+ Meteor.user().toggleBoardStar(boardId);
evt.preventDefault();
}
}];