mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Port report comment toggle feature to TypeScript
This commit is contained in:
parent
9e2a9a2be9
commit
01bedd1143
2 changed files with 7 additions and 1 deletions
|
@ -0,0 +1,6 @@
|
|||
export function entryCommentToggle(event: Event): void {
|
||||
const button = event.target as HTMLButtonElement;
|
||||
const id = button.dataset.id;
|
||||
|
||||
document.querySelector(`#mod-comments-section-${id}`).classList.toggle('d-none');
|
||||
}
|
|
@ -51,5 +51,5 @@
|
|||
%span{ id: "mod-comment-count-#{report.id}" }= report.moderation_comments.all.count
|
||||
%button.btn.btn-default.btn-sm{ type: :button, name: 'mod-delete-report', data: { id: report.id } }
|
||||
%i.fa.fa-trash-o
|
||||
.card-footer{ id: "mod-comments-section-#{report.id}", style: 'display: none' }
|
||||
.card-footer.d-none{ id: "mod-comments-section-#{report.id}" }
|
||||
%div{ id: "mod-comments-#{report.id}" }= render 'moderation/discussion', report: report
|
||||
|
|
Loading…
Reference in a new issue