Collapse Lists.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2024-04-26 07:33:06 +03:00
parent f22f470ba4
commit a601ba542a
9 changed files with 159 additions and 58 deletions

View file

@ -31,6 +31,17 @@ BlazeComponent.extendComponent({
return !status;
}
},
collapsed(check = undefined) {
const list = Template.currentData();
const status = list.isCollapsed();
if (check === undefined) {
// just check
return status;
} else {
list.collapse(!status);
return !status;
}
},
editTitle(event) {
event.preventDefault();
const newTitle = this.childComponents('inlinedForm')[0]
@ -104,6 +115,10 @@ BlazeComponent.extendComponent({
event.preventDefault();
this.starred(!this.starred());
},
'click .js-collapse'(event) {
event.preventDefault();
this.collapsed(!this.collapsed());
},
'click .js-open-list-menu': Popup.open('listAction'),
'click .js-add-card.list-header-plus-top'(event) {
const listDom = $(event.target).parents(