Skip to content

Commit

Permalink
click indicators on non-transactions to toggle metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu committed Feb 27, 2025
1 parent 38e8043 commit 62a8b46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions frontend/css/journal-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@
.journal.show-open .open,
.journal.show-pad .pad,
.journal.show-query .query,
/* Show metadata and postings if it was toggled for the whole journal. */
.journal.show-metadata .metadata,
.journal.show-postings .postings,
.transaction.show-postings .postings,
.transaction.show-postings .metadata {
/* Show metadata and postings where it was explicitly toggled with the indicators. */
.journal > li.show-full-entry .postings,
.journal > li.show-full-entry .metadata {
display: block;
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/journal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ function handleClick({ target }: Event): void {
}
} else if (target.closest(".indicators")) {
// Toggle postings and metadata by clicking on indicators.
const entry = target.closest(".transaction");
const entry = target.closest(".journal > li");
if (entry) {
entry.classList.toggle("show-postings");
entry.classList.toggle("show-full-entry");
}
}
}
Expand Down

0 comments on commit 62a8b46

Please sign in to comment.