From 9b145e5f2bb492e484076c3eeb4c767a1f9556ee Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Wed, 1 Oct 2025 22:21:49 -0700 Subject: [PATCH] remove ujs handling of pinning images so our custom click handling can handle it (doubled up, oops) --- .../content/form/gallery/_panel.html.erb | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/app/views/content/form/gallery/_panel.html.erb b/app/views/content/form/gallery/_panel.html.erb index 7a7df2c1..dcb342fc 100644 --- a/app/views/content/form/gallery/_panel.html.erb +++ b/app/views/content/form/gallery/_panel.html.erb @@ -53,10 +53,7 @@ <%= link_to toggle_image_pin_path(image_type: 'image_upload', image_id: image_data.id), class: "pin-button-overlay js-toggle-pin #{is_pinned ? 'amber-text' : 'grey-text'} tooltipped", - remote: true, - method: :post, - data: { - type: 'json', + data: { position: 'top', tooltip: 'Pin this image to always use it in previews of this page' } do %> @@ -66,12 +63,10 @@ <%= link_to image_deletion_path(image_data.id), class: 'delete-button-overlay js-remove-image red-text tooltipped', - method: 'delete', - remote: true, - data: { + data: { confirm: "Are you sure? This can't be undone.", position: 'top', - tooltip: 'Delete this image' + tooltip: 'Delete this image' } do %> delete <% end %> @@ -102,11 +97,8 @@ <%= link_to toggle_image_pin_path(image_type: 'basil_commission', image_id: image_data.id), class: "pin-button-overlay js-toggle-pin #{is_pinned ? 'amber-text' : 'grey-text'} tooltipped", - remote: true, - method: :post, - data: { - type: 'json', - position: 'top', + data: { + position: 'top', tooltip: 'Pin this image to always use it in previews of this page' } do %> push_pin @@ -115,9 +107,7 @@ <%= link_to basil_delete_path(image_data), class: 'delete-button-overlay js-remove-image red-text tooltipped', - method: 'delete', - remote: true, - data: { + data: { confirm: "Are you sure? This can't be undone.", position: 'top', tooltip: 'Delete this image'