diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-06-12 13:59:39 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-06-12 17:48:15 +0200 |
commit | c8945679872a0708eb67a477a99a65d508c84cb0 (patch) | |
tree | 5cf9f2cc842f891451f7bc247b5f0833c1ab39e7 /collections | |
parent | 216887490e3be0ba141484afc11d37475e91562d (diff) | |
download | wekan-c8945679872a0708eb67a477a99a65d508c84cb0.tar.gz wekan-c8945679872a0708eb67a477a99a65d508c84cb0.tar.bz2 wekan-c8945679872a0708eb67a477a99a65d508c84cb0.zip |
Work on the card activities and comments
This commit also introduces a new CSSEvents object that is used to
abstract vendor specifics events related to CSS transitions and
animations.
Fixes #183.
Fixes #179.
Diffstat (limited to 'collections')
-rw-r--r-- | collections/cards.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/collections/cards.js b/collections/cards.js index 374dcbc3..92a3f618 100644 --- a/collections/cards.js +++ b/collections/cards.js @@ -130,8 +130,7 @@ Cards.helpers({ return _.contains(this.members, memberId); }, activities: function() { - return Activities.find({ type: 'card', cardId: this._id }, - { sort: { createdAt: -1 }}); + return Activities.find({ cardId: this._id }, { sort: { createdAt: -1 }}); }, comments: function() { return CardComments.find({ cardId: this._id }, { sort: { createdAt: -1 }}); @@ -182,7 +181,6 @@ CardComments.before.insert(function(userId, doc) { if (Meteor.isServer) { Cards.after.insert(function(userId, doc) { Activities.insert({ - type: 'card', activityType: 'createCard', boardId: doc.boardId, listId: doc.listId, @@ -196,7 +194,6 @@ if (Meteor.isServer) { if (_.contains(fieldNames, 'archived')) { if (doc.archived) { Activities.insert({ - type: 'card', activityType: 'archivedCard', boardId: doc.boardId, listId: doc.listId, @@ -205,7 +202,6 @@ if (Meteor.isServer) { }); } else { Activities.insert({ - type: 'card', activityType: 'restoredCard', boardId: doc.boardId, listId: doc.listId, @@ -221,7 +217,6 @@ if (Meteor.isServer) { var oldListId = this.previous.listId; if (_.contains(fieldNames, 'listId') && doc.listId !== oldListId) { Activities.insert({ - type: 'card', activityType: 'moveCard', listId: doc.listId, oldListId: oldListId, @@ -242,7 +237,6 @@ if (Meteor.isServer) { memberId = modifier.$addToSet.members; if (! _.contains(doc.members, memberId)) { Activities.insert({ - type: 'card', activityType: 'joinMember', boardId: doc.boardId, cardId: doc._id, @@ -256,7 +250,6 @@ if (Meteor.isServer) { if (modifier.$pull && modifier.$pull.members) { memberId = modifier.$pull.members; Activities.insert({ - type: 'card', activityType: 'unjoinMember', boardId: doc.boardId, cardId: doc._id, @@ -275,7 +268,6 @@ if (Meteor.isServer) { CardComments.after.insert(function(userId, doc) { Activities.insert({ - type: 'comment', activityType: 'addComment', boardId: doc.boardId, cardId: doc.cardId, |