Skip to content

Commit 9b145e5

Browse files
committed
remove ujs handling of pinning images so our custom click handling can handle it (doubled up, oops)
1 parent d1225c3 commit 9b145e5

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

app/views/content/form/gallery/_panel.html.erb

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@
5353
<!-- Pin button with tooltip (positioned absolutely) -->
5454
<%= link_to toggle_image_pin_path(image_type: 'image_upload', image_id: image_data.id),
5555
class: "pin-button-overlay js-toggle-pin #{is_pinned ? 'amber-text' : 'grey-text'} tooltipped",
56-
remote: true,
57-
method: :post,
58-
data: {
59-
type: 'json',
56+
data: {
6057
position: 'top',
6158
tooltip: 'Pin this image to always use it in previews of this page'
6259
} do %>
@@ -66,12 +63,10 @@
6663
<!-- Delete button with tooltip (positioned absolutely) -->
6764
<%= link_to image_deletion_path(image_data.id),
6865
class: 'delete-button-overlay js-remove-image red-text tooltipped',
69-
method: 'delete',
70-
remote: true,
71-
data: {
66+
data: {
7267
confirm: "Are you sure? This can't be undone.",
7368
position: 'top',
74-
tooltip: 'Delete this image'
69+
tooltip: 'Delete this image'
7570
} do %>
7671
<i class="material-icons">delete</i>
7772
<% end %>
@@ -102,11 +97,8 @@
10297
<!-- Pin button with tooltip (positioned absolutely) -->
10398
<%= link_to toggle_image_pin_path(image_type: 'basil_commission', image_id: image_data.id),
10499
class: "pin-button-overlay js-toggle-pin #{is_pinned ? 'amber-text' : 'grey-text'} tooltipped",
105-
remote: true,
106-
method: :post,
107-
data: {
108-
type: 'json',
109-
position: 'top',
100+
data: {
101+
position: 'top',
110102
tooltip: 'Pin this image to always use it in previews of this page'
111103
} do %>
112104
<i class="material-icons">push_pin</i>
@@ -115,9 +107,7 @@
115107
<!-- Delete button with tooltip (positioned absolutely) -->
116108
<%= link_to basil_delete_path(image_data),
117109
class: 'delete-button-overlay js-remove-image red-text tooltipped',
118-
method: 'delete',
119-
remote: true,
120-
data: {
110+
data: {
121111
confirm: "Are you sure? This can't be undone.",
122112
position: 'top',
123113
tooltip: 'Delete this image'

0 commit comments

Comments
 (0)