mirror of
https://github.com/wekan/wekan.git
synced 2026-11-20 21:45:01 -05:00
- The five leave the card's actions menu. On the opened card each is in the hamburger of its section: Subtasks (Filter: Subtasks, and the subtask settings), Voting, Planning Poker, Spent time, and a new Scrum settings heading over the Scrum fields the card shows (Card kind). Voting, Planning Poker and Spent time show their heading when ticked "On this card" before there is anything in them, so the hamburger can fill them in. - Card Settings: everything in a section's hamburger is also at the top of that section's pane, under its title - the card's actions when it is opened from a card, Subtask settings also from Board Settings. tests/cardSectionActions.test.cjs fails for a hamburger that is not. - Filter: Subtasks is one function, client/lib/filterSubtasks.js. - Card Settings: no select-all rows for Show on Minicard and Show on Card in its first entry, where there is nothing under them; the popup is high enough for every entry of its menu. Docs: docs/Features/Cards/Card-Fields.md. Thanks to xet7 !
23 lines
1.0 KiB
JavaScript
23 lines
1.0 KiB
JavaScript
import { Session } from 'meteor/session';
|
|
import { Filter } from '/client/lib/filter';
|
|
import { Utils } from '/client/lib/utils';
|
|
import { getSidebarInstance } from '/client/features/sidebar/service';
|
|
|
|
// Filter: Subtasks - the board filtered to this card's subtasks, with the
|
|
// card closed so the board can be seen. Reached from the opened card's
|
|
// Subtasks hamburger and from Card Settings' Checklists pane
|
|
// (docs/Features/Cards/Card-Fields.md); it was in the card's actions menu.
|
|
export function filterSubtasksOf(card) {
|
|
if (!card || !card._id || card.boardId !== Session.get('currentBoard')) return;
|
|
Filter.parentId.reset();
|
|
Filter.parentId.add(card._id);
|
|
Filter.resetExceptions();
|
|
Session.set('openCards', (Session.get('openCards') || []).filter(id => id !== card._id));
|
|
if (Session.get('currentCard') === card._id) Session.set('currentCard', null);
|
|
Session.set('popupCardId', null);
|
|
Session.set('popupCardBoardId', null);
|
|
Popup.close();
|
|
Utils.goBoardId(card.boardId);
|
|
getSidebarInstance().setView('filter');
|
|
}
|