mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 13:18:49 +01:00
finish adding[4~ copyMany
This commit is contained in:
parent
842c8b83d2
commit
257ed56db3
2 changed files with 13 additions and 6 deletions
|
|
@ -165,9 +165,6 @@ template(name="copyManyCardPopup")
|
||||||
else
|
else
|
||||||
+boardsAndLists
|
+boardsAndLists
|
||||||
|
|
||||||
template(name="boardsAndLists")
|
|
||||||
|
|
||||||
|
|
||||||
template(name="boardsAndLists")
|
template(name="boardsAndLists")
|
||||||
select.js-select-boards
|
select.js-select-boards
|
||||||
each boards
|
each boards
|
||||||
|
|
|
||||||
|
|
@ -313,10 +313,20 @@ Template.copyManyCardPopup.events({
|
||||||
|
|
||||||
if (titleEntry) {
|
if (titleEntry) {
|
||||||
var title, titleList;
|
var title, titleList;
|
||||||
|
console.log(titleEntry);
|
||||||
|
console.log(titleEntry.length);
|
||||||
|
var titleList = JSON.parse(titleEntry);
|
||||||
|
console.log(titleList);
|
||||||
|
console.log(titleList[0]);
|
||||||
|
console.log(titleList[0].title);
|
||||||
|
|
||||||
|
|
||||||
for (let title of titleList.split(",")) {
|
for (var i = 0; i < titleList.length; i++){
|
||||||
|
var obj = titleList[i];
|
||||||
|
console.log(obj.title);
|
||||||
|
|
||||||
card.title = title;
|
card.title = obj.title;
|
||||||
|
card.description = obj.description;
|
||||||
card.coverId = '';
|
card.coverId = '';
|
||||||
const _id = Cards.insert(card);
|
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
|
||||||
|
|
@ -344,9 +354,9 @@ Template.copyManyCardPopup.events({
|
||||||
comment._id = null;
|
comment._id = null;
|
||||||
CardComments.insert(comment);
|
CardComments.insert(comment);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
Popup.close();
|
Popup.close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue