Skip to content

Commit

Permalink
add mass selection to tag changes reversion (derpibooru/philomena#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Mar 1, 2021
1 parent f112f79 commit 7fa9cd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions assets/js/boorujs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */ },
Expand Down
8 changes: 7 additions & 1 deletion lib/philomena_web/templates/tag_change/index.html.slime
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7fa9cd5

Please sign in to comment.