From b4b860df6088254556fa6836e3bbca27cd9c41be Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 8 May 2018 09:30:59 +0200 Subject: [PATCH] Fix draggable trash item feature Since the introduction of the nested elements feature this is broken, because the necessary `data-droppable-elements` attribute was missing on the "main content" cell div and had a duplicated `data-data` on the cells div. --- app/views/alchemy/admin/elements/index.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/alchemy/admin/elements/index.html.erb b/app/views/alchemy/admin/elements/index.html.erb index fbdc2c38a0..eff4e59b8f 100644 --- a/app/views/alchemy/admin/elements/index.html.erb +++ b/app/views/alchemy/admin/elements/index.html.erb @@ -10,7 +10,9 @@ <% end %> -
+
<%= render partial: 'alchemy/admin/elements/element', collection: @page.elements.not_trashed.not_in_cell %>
@@ -18,7 +20,7 @@ <%= content_tag :div, id: "cell_#{cell.name}", class: ["sortable_cell", "#{cell.name}_cell"].join(' '), - data: {'cell-id' => cell.id, 'data-droppable-elements' => cell.element_definitions.join(' ')} do %> + data: {'cell-id' => cell.id, 'droppable-elements' => cell.element_definitions.join(' ')} do %> <%= render partial: 'alchemy/admin/elements/element', collection: elements %> <% end %> <% end %>