Skip to content

Commit

Permalink
Merge pull request #1429 from tvdeyen/4.0/fix/draggable-trash-items
Browse files Browse the repository at this point in the history
Fix draggable trash item feature (4.0)
  • Loading branch information
tvdeyen authored May 8, 2018
2 parents 6871b11 + b4b860d commit 719a76c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/alchemy/admin/elements/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
</li>
<% end %>
</ul>
<div id="cell_for_other_elements" class="sortable_cell for_other_elements_cell">
<div id="cell_for_other_elements"
class="sortable_cell for_other_elements_cell"
data-droppable-elements="<%= @page.element_names_from_definition.join(' ') %>">
<%= render partial: 'alchemy/admin/elements/element',
collection: @page.elements.not_trashed.not_in_cell %>
</div>
<% @elements.each do |cell, elements| -%>
<%= 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 %>
Expand Down

0 comments on commit 719a76c

Please sign in to comment.