diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-05-27 17:17:00 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-05-27 17:23:25 +0200 |
commit | dcc64f44f9f81d32c8071c6bdac86546eaeb57a0 (patch) | |
tree | b8977727227a3ddbb2874ea3f86f1e26e03c8835 /collections | |
parent | 42f6dc686f313ba294e3cbcfb0ebde50678580fe (diff) | |
download | wekan-dcc64f44f9f81d32c8071c6bdac86546eaeb57a0.tar.gz wekan-dcc64f44f9f81d32c8071c6bdac86546eaeb57a0.tar.bz2 wekan-dcc64f44f9f81d32c8071c6bdac86546eaeb57a0.zip |
UI improvements
* 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.
Diffstat (limited to 'collections')
-rw-r--r-- | collections/boards.js | 5 | ||||
-rw-r--r-- | collections/users.js | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/collections/boards.js b/collections/boards.js index 2d5c6099..294b7584 100644 --- a/collections/boards.js +++ b/collections/boards.js @@ -62,8 +62,9 @@ Boards.attachSchema(new SimpleSchema({ }, color: { type: String, - allowedValues: ['nephritis', 'pomegranate', 'belize', - 'wisteria', 'midnight', 'pumpkin'] + allowedValues: [ + 'nephritis', 'pomegranate', 'belize', + 'wisteria', 'midnight', 'pumpkin'] } })); diff --git a/collections/users.js b/collections/users.js index 54c0a298..6e2c6bdc 100644 --- a/collections/users.js +++ b/collections/users.js @@ -29,6 +29,15 @@ Users.helpers({ var board = Boards.findOne(Session.get('currentBoard')); if (this.isBoardMember(board)) return _.where(board.members, {userId: this._id})[0].isAdmin; + }, + + toggleBoardStar: function(boardId) { + var queryType = Meteor.user().hasStarred(boardId) ? '$pull' : '$addToSet'; + var query = {}; + query[queryType] = { + 'profile.starredBoards': boardId + }; + Meteor.users.update(Meteor.userId(), query); } }); |