diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade index 350da35b1..ce3ff17a9 100644 --- a/client/components/cards/checklists.jade +++ b/client/components/cards/checklists.jade @@ -32,7 +32,6 @@ template(name="checklistDetail") span if canModifyCard a.fa.fa-navicon.checklist-details-menu.js-open-checklist-details-menu(title="{{_ 'checklistActionsPopup-title'}}") - a.js-delete-checklist.toggle-delete-checklist-dialog {{_ "delete"}}... if canModifyCard h2.title.js-open-inlined-form.is-editable @@ -138,3 +137,6 @@ template(name="boardsSwimlanesAndLists") template(name="checklistActionsPopup") ul.pop-over-list li + a.js-delete-checklist.delete-checklist + i.fa.fa-trash + | {{_ "delete"}}... diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js index 609e4b251..745740895 100644 --- a/client/components/cards/checklists.js +++ b/client/components/cards/checklists.js @@ -191,13 +191,6 @@ BlazeComponent.extendComponent({ { ...events, 'click .js-open-checklist-details-menu': Popup.open('checklistActions'), - 'click .toggle-delete-checklist-dialog' : Popup.afterConfirm('checklistDelete', function () { - Popup.close(); - const checklist = this.checklist; - if (checklist && checklist._id) { - Checklists.remove(checklist._id); - } - }), 'submit .js-add-checklist': this.addChecklist, 'submit .js-edit-checklist-title': this.editChecklist, 'submit .js-add-checklist-item': this.addChecklistItem, @@ -294,6 +287,22 @@ BlazeComponent.extendComponent({ } }).register('addChecklistItemForm'); +BlazeComponent.extendComponent({ + events() { + return [ + { + 'click .js-delete-checklist' : Popup.afterConfirm('checklistDelete', function () { + Popup.back(2); + const checklist = this.checklist; + if (checklist && checklist._id) { + Checklists.remove(checklist._id); + } + }), + } + ] + } +}).register('checklistActionsPopup'); + BlazeComponent.extendComponent({ onRendered() { autosize(this.$('textarea.js-edit-checklist-item')); diff --git a/client/components/cards/checklists.styl b/client/components/cards/checklists.styl index 22e17df1d..c711eb3b9 100644 --- a/client/components/cards/checklists.styl +++ b/client/components/cards/checklists.styl @@ -39,9 +39,6 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item &.is-finished color: #3cb500 - .js-delete-checklist - @extends .delete-text - span.fa.checklist-handle padding-right: 20px padding-top: 3px