add mass selection to tag changes reversion (derpibooru/philomena#239)

This commit is contained in:
byte[] 2021-03-01 12:09:41 -05:00
parent f112f7928b
commit 7fa9cd56f6
2 changed files with 9 additions and 1 deletions

View file

@ -38,6 +38,8 @@ const actions = {
selectvalue(data) { document.querySelector(data.value).value = data.el.querySelector(':checked').dataset.setValue; },
checkall(data) { $$(`${data.value} input[type=checkbox]`).forEach(c => { c.checked = !c.checked; }) },
focus(data) { document.querySelector(data.value).focus(); },
preventdefault() { /* The existence of this entry is enough */ },

View file

@ -1,7 +1,13 @@
.block__header
= @pagination
= form_for :tag_changes, Routes.tag_change_revert_path(@conn, :create), fn _f ->
= if reverts_tag_changes?(@conn) do
.block__header.block__header--light.block__header--sub
a data-click-checkall=".tag-changes-form"
i.fa.fa-check>
' Toggle all
= form_for :tag_changes, Routes.tag_change_revert_path(@conn, :create), [class: "tag-changes-form"], fn _f ->
.block__content
table.table
thead