mirror of https://github.com/wekan/wekan
The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
675 B
31 lines
675 B
|
11 years ago
|
BlazeComponent.extendComponent({
|
||
|
|
template: function() {
|
||
|
|
return 'boardList';
|
||
|
|
},
|
||
|
|
|
||
|
|
boards: function() {
|
||
|
10 years ago
|
return Boards.find({
|
||
|
|
archived: false,
|
||
|
|
'members.userId': Meteor.userId()
|
||
|
|
}, {
|
||
|
11 years ago
|
sort: ['title']
|
||
|
|
});
|
||
|
|
},
|
||
|
|
|
||
|
|
isStarred: function() {
|
||
|
|
var user = Meteor.user();
|
||
|
10 years ago
|
return user && user.hasStarred(this.currentData()._id);
|
||
|
11 years ago
|
},
|
||
|
|
|
||
|
|
events: function() {
|
||
|
|
return [{
|
||
|
11 years ago
|
'click .js-add-board': Popup.open('createBoard'),
|
||
|
11 years ago
|
'click .js-star-board': function(evt) {
|
||
|
10 years ago
|
var boardId = this.currentData()._id;
|
||
|
|
Meteor.user().toggleBoardStar(boardId);
|
||
|
11 years ago
|
evt.preventDefault();
|
||
|
11 years ago
|
}
|
||
|
11 years ago
|
}];
|
||
|
|
}
|
||
|
|
}).register('boardList');
|