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
|
span
|
||||||
if canModifyCard
|
if canModifyCard
|
||||||
a.fa.fa-navicon.checklist-details-menu.js-open-checklist-details-menu(title="{{_ 'checklistActionsPopup-title'}}")
|
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
|
if canModifyCard
|
||||||
h2.title.js-open-inlined-form.is-editable
|
h2.title.js-open-inlined-form.is-editable
|
||||||
|
|
@ -138,3 +137,6 @@ template(name="boardsSwimlanesAndLists")
|
||||||
template(name="checklistActionsPopup")
|
template(name="checklistActionsPopup")
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
li
|
li
|
||||||
|
a.js-delete-checklist.delete-checklist
|
||||||
|
i.fa.fa-trash
|
||||||
|
| {{_ "delete"}}...
|
||||||
|
|
|
||||||
|
|
@ -191,13 +191,6 @@ BlazeComponent.extendComponent({
|
||||||
{
|
{
|
||||||
...events,
|
...events,
|
||||||
'click .js-open-checklist-details-menu': Popup.open('checklistActions'),
|
'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-add-checklist': this.addChecklist,
|
||||||
'submit .js-edit-checklist-title': this.editChecklist,
|
'submit .js-edit-checklist-title': this.editChecklist,
|
||||||
'submit .js-add-checklist-item': this.addChecklistItem,
|
'submit .js-add-checklist-item': this.addChecklistItem,
|
||||||
|
|
@ -294,6 +287,22 @@ BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
}).register('addChecklistItemForm');
|
}).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({
|
BlazeComponent.extendComponent({
|
||||||
onRendered() {
|
onRendered() {
|
||||||
autosize(this.$('textarea.js-edit-checklist-item'));
|
autosize(this.$('textarea.js-edit-checklist-item'));
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||||
&.is-finished
|
&.is-finished
|
||||||
color: #3cb500
|
color: #3cb500
|
||||||
|
|
||||||
.js-delete-checklist
|
|
||||||
@extends .delete-text
|
|
||||||
|
|
||||||
span.fa.checklist-handle
|
span.fa.checklist-handle
|
||||||
padding-right: 20px
|
padding-right: 20px
|
||||||
padding-top: 3px
|
padding-top: 3px
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue