mirror of
https://github.com/wekan/wekan.git
synced 2026-02-05 08:01:49 +01:00
Try to fix : Filter List by Title - prevent showing only the list title - Hiding empty lists in Swimlane view
This commit is contained in:
parent
89a7bb8bc8
commit
6c83cb5b44
3 changed files with 42 additions and 9 deletions
|
|
@ -14,7 +14,8 @@ template(name="swimlane")
|
|||
+addListForm
|
||||
else
|
||||
each lists
|
||||
+list(this)
|
||||
if visible this
|
||||
+list(this)
|
||||
if currentCardIsInThisList _id ../_id
|
||||
+cardDetails(currentCard)
|
||||
if currentUser.isBoardMember
|
||||
|
|
|
|||
|
|
@ -137,19 +137,38 @@ BlazeComponent.extendComponent({
|
|||
this._isDragging = false;
|
||||
this._lastDragPositionX = 0;
|
||||
},
|
||||
|
||||
id() {
|
||||
return this._id;
|
||||
},
|
||||
|
||||
currentCardIsInThisList(listId, swimlaneId) {
|
||||
return currentCardIsInThisList(listId, swimlaneId);
|
||||
},
|
||||
|
||||
currentListIsInThisSwimlane(swimlaneId) {
|
||||
return currentListIsInThisSwimlane(swimlaneId);
|
||||
},
|
||||
|
||||
visible(list) {
|
||||
if (list.archived) {
|
||||
// Show archived list only when filter archive is on or archive is selected
|
||||
if (!(Filter.archive.isSelected() || archivedRequested)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (Filter.lists._isActive()) {
|
||||
if (!list.title.match(Filter.lists.getRegexSelector())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (Filter.hideEmpty.isSelected()) {
|
||||
const swimlaneId = this.parentComponent()
|
||||
.parentComponent()
|
||||
.data()._id;
|
||||
const cards = list.cards(swimlaneId);
|
||||
if (cards.count() === 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue