summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorErik Turk <erik.turk@ontera.ca>2018-02-08 10:13:54 -0500
committerErik Turk <erik.turk@ontera.ca>2018-02-08 10:13:54 -0500
commitecd77c87049a5b3e7e9b3edc8867944c14aa4319 (patch)
tree01f4ca40730dbcd03b951c0fa57d1a65a997ad2d /client/components/cards
parentc5019e620a5371b73affd9d635ceef9d183d6b45 (diff)
downloadwekan-ecd77c87049a5b3e7e9b3edc8867944c14aa4319.tar.gz
wekan-ecd77c87049a5b3e7e9b3edc8867944c14aa4319.tar.bz2
wekan-ecd77c87049a5b3e7e9b3edc8867944c14aa4319.zip
fixed spacing & indentation - changed var to const
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/cardDetails.js68
1 files changed, 32 insertions, 36 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index a487022e..35081679 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -312,43 +312,39 @@ Template.copyManyCardPopup.events({
card.sort = Lists.findOne(this._id).cards().count();
if (titleEntry) {
- var titleList;
- var titleList = JSON.parse(titleEntry);
-
-
+ const titleList = JSON.parse(titleEntry);
for (var i = 0; i < titleList.length; i++){
- var obj = titleList[i];
-
- card.title = obj.title;
- card.description = obj.description;
- card.coverId = '';
- const _id = Cards.insert(card);
-// In case the filter is active we need to add the newly inserted card in
- // the list of exceptions -- cards that are not filtered. Otherwise the
- // card will disappear instantly.
- // See https://github.com/wekan/wekan/issues/80
- Filter.addException(_id);
-
- // copy checklists
- let cursor = Checklists.find({cardId: oldId});
- cursor.forEach(function() {
- 'use strict';
- const checklist = arguments[0];
- checklist.cardId = _id;
- checklist._id = null;
- Checklists.insert(checklist);
- });
-
- // copy card comments
- cursor = CardComments.find({cardId: oldId});
- cursor.forEach(function () {
- 'use strict';
- const comment = arguments[0];
- comment.cardId = _id;
- comment._id = null;
- CardComments.insert(comment);
- });
- }
+ let obj = titleList[i];
+ card.title = obj.title;
+ card.description = obj.description;
+ card.coverId = '';
+ const _id = Cards.insert(card);
+ // In case the filter is active we need to add the newly inserted card in
+ // the list of exceptions -- cards that are not filtered. Otherwise the
+ // card will disappear instantly.
+ // See https://github.com/wekan/wekan/issues/80
+ Filter.addException(_id);
+
+ // copy checklists
+ let cursor = Checklists.find({cardId: oldId});
+ cursor.forEach(function() {
+ 'use strict';
+ const checklist = arguments[0];
+ checklist.cardId = _id;
+ checklist._id = null;
+ Checklists.insert(checklist);
+ });
+
+ // copy card comments
+ cursor = CardComments.find({cardId: oldId});
+ cursor.forEach(function () {
+ 'use strict';
+ const comment = arguments[0];
+ comment.cardId = _id;
+ comment._id = null;
+ CardComments.insert(comment);
+ });
+ }
Popup.close();
}
},