add titleList.split to copyManyCard

This commit is contained in:
Erik Turk 2018-02-05 14:47:37 -05:00
parent 326b4c5350
commit 9705118ca2

View file

@ -307,15 +307,19 @@ Template.copyManyCardPopup.events({
const list = Lists.findOne(card.listId);
card.boardId = list.boardId;
const textarea = $(evt.currentTarget).parents('.content').find('textarea');
const title = textarea.val().trim();
const titleEntry = textarea.val().trim();
// insert new card to the bottom of new list
card.sort = Lists.findOne(this._id).cards().count();
if (title) {
if (titleEntry) {
var title, titleList;
for (let title of titleList.split(",") {
card.title = title;
card.coverId = '';
const _id = Cards.insert(card);
// In case the filter is active we need to add the newly inserted card in
// 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
@ -342,6 +346,7 @@ Template.copyManyCardPopup.events({
});
Popup.close();
}
}
},
});