|
@@ -94,16 +94,14 @@ BlazeComponent.extendComponent({
|
|
title,
|
|
title,
|
|
sort: card.checklists().count(),
|
|
sort: card.checklists().count(),
|
|
});
|
|
});
|
|
|
|
+ this.closeAllInlinedForms();
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.$('.add-checklist-item')
|
|
this.$('.add-checklist-item')
|
|
.last()
|
|
.last()
|
|
.click();
|
|
.click();
|
|
}, 100);
|
|
}, 100);
|
|
}
|
|
}
|
|
- textarea.value = '';
|
|
|
|
- textarea.focus();
|
|
|
|
},
|
|
},
|
|
-
|
|
|
|
addChecklistItem(event) {
|
|
addChecklistItem(event) {
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
const textarea = this.find('textarea.js-add-checklist-item');
|
|
const textarea = this.find('textarea.js-add-checklist-item');
|
|
@@ -190,6 +188,10 @@ BlazeComponent.extendComponent({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ closeAllInlinedForms() {
|
|
|
|
+ this.$('.js-close-inlined-form').click();
|
|
|
|
+ },
|
|
|
|
+
|
|
events() {
|
|
events() {
|
|
const events = {
|
|
const events = {
|
|
'click .toggle-delete-checklist-dialog'(event) {
|
|
'click .toggle-delete-checklist-dialog'(event) {
|
|
@@ -214,6 +216,8 @@ BlazeComponent.extendComponent({
|
|
'click .js-delete-checklist-item': this.deleteItem,
|
|
'click .js-delete-checklist-item': this.deleteItem,
|
|
'click .confirm-checklist-delete': this.deleteChecklist,
|
|
'click .confirm-checklist-delete': this.deleteChecklist,
|
|
'focus .js-add-checklist-item': this.focusChecklistItem,
|
|
'focus .js-add-checklist-item': this.focusChecklistItem,
|
|
|
|
+ 'click .add-checklist-item.js-open-inlined-form': this.closeAllInlinedForms,
|
|
|
|
+ 'click .add-checklist.js-open-inlined-form': this.closeAllInlinedForms,
|
|
keydown: this.pressKey,
|
|
keydown: this.pressKey,
|
|
},
|
|
},
|
|
];
|
|
];
|