mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Collapse Lists.
Thanks to xet7 !
This commit is contained in:
parent
f22f470ba4
commit
a601ba542a
9 changed files with 159 additions and 58 deletions
|
|
@ -156,6 +156,13 @@ Lists.attachSchema(
|
|||
type: String,
|
||||
defaultValue: 'list',
|
||||
},
|
||||
collapsed: {
|
||||
/**
|
||||
* is the list collapsed
|
||||
*/
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
@ -286,6 +293,10 @@ Lists.helpers({
|
|||
return this.starred === true;
|
||||
},
|
||||
|
||||
isCollapsed() {
|
||||
return this.collapsed === true;
|
||||
},
|
||||
|
||||
absoluteUrl() {
|
||||
const card = ReactiveCache.getCard({ listId: this._id });
|
||||
return card && card.absoluteUrl();
|
||||
|
|
@ -306,6 +317,9 @@ Lists.mutations({
|
|||
star(enable = true) {
|
||||
return { $set: { starred: !!enable } };
|
||||
},
|
||||
collapse(enable = true) {
|
||||
return { $set: { collapsed: !!enable } };
|
||||
},
|
||||
|
||||
archive() {
|
||||
if (this.isTemplateList()) {
|
||||
|
|
|
|||
|
|
@ -107,6 +107,13 @@ Swimlanes.attachSchema(
|
|||
type: String,
|
||||
defaultValue: 'swimlane',
|
||||
},
|
||||
collapsed: {
|
||||
/**
|
||||
* is the swimlane collapsed
|
||||
*/
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
@ -232,6 +239,10 @@ Swimlanes.helpers({
|
|||
return ret;
|
||||
},
|
||||
|
||||
isCollapsed() {
|
||||
return this.collapsed === true;
|
||||
},
|
||||
|
||||
board() {
|
||||
return ReactiveCache.getBoard(this.boardId);
|
||||
},
|
||||
|
|
@ -274,6 +285,10 @@ Swimlanes.mutations({
|
|||
return { $set: { title } };
|
||||
},
|
||||
|
||||
collapse(enable = true) {
|
||||
return { $set: { collapsed: !!enable } };
|
||||
},
|
||||
|
||||
archive() {
|
||||
if (this.isTemplateSwimlane()) {
|
||||
this.myLists().forEach(list => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue