summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/components/lists/listHeader.js17
-rw-r--r--i18n/en.i18n.json6
2 files changed, 19 insertions, 4 deletions
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index 28e7ab89..745d1255 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -60,13 +60,28 @@ Template.listImportCardPopup.events({
sortIndex = Utils.calculateIndex(null, firstCardDom).base;
const cardToCreate = {
title: data.name,
+ description: data.desc,
listId: this._id,
boardId: this.boardId,
userId: Meteor.userId(),
sort: sortIndex,
}
- // 3. finally, insert new card into list
+ // 3. insert new card into list
const _id = Cards.insert(cardToCreate);
+ // 4. parse actions and add comments/activities - if any
+ data.actions.forEach((current, i, actions)=>{
+ if(current.type == 'commentCard') {
+ const commentToCreate = {
+ boardId: this.boardId,
+ cardId: _id,
+ userId: Meteor.userId(),
+ text: current.data.text
+ }
+ CardComments.insert(commentToCreate);
+ }
+ Popup.close();
+ });
+
// 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.
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 436db890..331d8415 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -65,7 +65,7 @@
"card-edit-attachments": "Edit attachments",
"card-edit-labels": "Edit labels",
"card-edit-members": "Edit members",
- "card-json": "Card data",
+ "card-json": "Go to a Trello card, select 'Share and more...' then 'Export JSON' and copy the resulting text",
"card-json-placeholder": "Paste your valid JSON data here",
"card-labels-title": "Change the labels for the card.",
"card-members-title": "Add or remove members of the board from the card.",
@@ -121,7 +121,7 @@
"header-logo-title": "Go back to your boards page.",
"home": "Home",
"import": "Import",
- "import-card": "Import as new card",
+ "import-card": "Import a Trello card",
"info": "Infos",
"initials": "Initials",
"joined": "joined",
@@ -140,7 +140,7 @@
"list-select-cards": "Select all cards in this list",
"listActionPopup-title": "List Actions",
"listArchiveCardsPopup-title": "Archive All Cards in this List?",
- "listImportCardPopup-title": "Import as new card",
+ "listImportCardPopup-title": "Import a Trello card",
"listMoveCardsPopup-title": "Move All Cards in List",
"lists": "Lists",
"log-out": "Log Out",