mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Merge branch 'mfilser-new_checklistitem_textarea_autoresize'
This commit is contained in:
commit
9c8d5c2613
1 changed files with 8 additions and 8 deletions
|
@ -186,12 +186,6 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
|
||||
// resize the textarea vertically to fit the user-input
|
||||
autoResize(event) {
|
||||
const textarea = event.target;
|
||||
textarea.style.height = textarea.scrollHeight + 'px';
|
||||
},
|
||||
|
||||
events() {
|
||||
const events = {
|
||||
'click .toggle-delete-checklist-dialog'(event) {
|
||||
|
@ -215,8 +209,6 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete-checklist-item': this.deleteItem,
|
||||
'click .confirm-checklist-delete': this.deleteChecklist,
|
||||
'focus .js-add-checklist-item': this.focusChecklistItem,
|
||||
'input textarea.js-edit-checklist-item': this.autoResize,
|
||||
'focus textarea.js-edit-checklist-item': this.autoResize,
|
||||
keydown: this.pressKey,
|
||||
},
|
||||
];
|
||||
|
@ -231,6 +223,14 @@ Template.checklists.helpers({
|
|||
},
|
||||
});
|
||||
|
||||
Template.addChecklistItemForm.onRendered(() => {
|
||||
autosize($('textarea.js-add-checklist-item'))
|
||||
});
|
||||
|
||||
Template.editChecklistItemForm.onRendered(() => {
|
||||
autosize($('textarea.js-edit-checklist-item'))
|
||||
});
|
||||
|
||||
Template.checklistDeleteDialog.onCreated(() => {
|
||||
const $cardDetails = this.$('.card-details');
|
||||
this.scrollState = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue