mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Comment, added confirm delete popup
This commit is contained in:
parent
ea73e4ec7d
commit
1a09b75974
3 changed files with 10 additions and 3 deletions
|
@ -21,6 +21,10 @@ template(name="editOrDeleteComment")
|
|||
= ' - '
|
||||
a.js-delete-comment {{_ "delete"}}
|
||||
|
||||
template(name="deleteCommentPopup")
|
||||
p {{_ "comment-delete"}}
|
||||
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
|
||||
|
||||
template(name="commentReactions")
|
||||
.reactions
|
||||
each reaction in reactions
|
||||
|
|
|
@ -220,10 +220,11 @@ BlazeComponent.extendComponent({
|
|||
return [
|
||||
{
|
||||
// XXX We should use Popup.afterConfirmation here
|
||||
'click .js-delete-comment'() {
|
||||
const commentId = this.currentData().activity.commentId;
|
||||
'click .js-delete-comment': Popup.afterConfirm('deleteComment', () => {
|
||||
const commentId = this.data().activity.commentId;
|
||||
CardComments.remove(commentId);
|
||||
},
|
||||
Popup.back();
|
||||
}),
|
||||
'submit .js-edit-comment'(evt) {
|
||||
evt.preventDefault();
|
||||
const commentText = this.currentComponent()
|
||||
|
|
|
@ -271,6 +271,8 @@
|
|||
"comment-placeholder": "Write Comment",
|
||||
"comment-only": "Comment only",
|
||||
"comment-only-desc": "Can comment on cards only.",
|
||||
"comment-delete": "Are you sure you want to delete the comment?",
|
||||
"deleteCommentPopup-title": "Delete comment?",
|
||||
"no-comments": "No comments",
|
||||
"no-comments-desc": "Can not see comments and activities.",
|
||||
"worker": "Worker",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue