mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 10:50:13 +01:00
Delete checklist moved to checklist menu action
This commit is contained in:
parent
7651c00d57
commit
e40e42103e
3 changed files with 19 additions and 11 deletions
|
|
@ -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"}}...
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue