mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00

* Implement visibility choice on board creation; * Rework the board header bar. Remove links to un-implemented features; * Implement a board star counter (visible if the board have >2 stars); * Define a new icon (a thin cross) to close elements; * Remove $(document).on('mouseover') event handlers that were basically fired hundreds of times for nothing, we now define a proper Tracker dependency to execute jquery-ui plugin initialization only when something has changed; * Bug fixes related to list scrolling.
34 lines
709 B
JavaScript
34 lines
709 B
JavaScript
BlazeComponent.extendComponent({
|
|
template: function() {
|
|
return 'boardList';
|
|
},
|
|
|
|
boards: function() {
|
|
return Boards.find({}, {
|
|
sort: ['title']
|
|
});
|
|
},
|
|
|
|
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);
|
|
},
|
|
|
|
events: function() {
|
|
return [{
|
|
'click .js-star-board': function(evt) {
|
|
Meteor.user().toggleBoardStar(this._id);
|
|
evt.preventDefault();
|
|
}
|
|
}];
|
|
}
|
|
}).register('boardList');
|