forked from fixin.me/fixin.me
Replace patched #dom_id with #dom_target
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<%= tag.tr id: dom_id(quantity),
|
||||
ondragstart: "dragStart(event)", ondragend: "dragEnd(event)",
|
||||
ondragover: "dragOver(event)", ondrop: "drop(event)",
|
||||
ondragenter: "dragEnter(event)", ondragleave: "dragLeave(event)",
|
||||
data: {drag_path: reparent_quantity_path(quantity), drop_id: dom_id(quantity),
|
||||
drop_id_param: "quantity[parent_id]"} do %>
|
||||
<tr id="<%= dom_target(quantity) %>"
|
||||
ondragstart="dragStart(event)" ondragend="dragEnd(event)"
|
||||
ondragover="dragOver(event)" ondrop="drop(event)"
|
||||
ondragenter="dragEnter(event)" ondragleave="dragLeave(event)"
|
||||
data-drag-path="<%= reparent_quantity_path(quantity) %>"
|
||||
data-drop-id="<%= dom_target(quantity) %>"
|
||||
data-drop-id-param="<%= field_name(:quantity, :parent_id) %>">
|
||||
|
||||
<td style="--depth:<%= quantity.depth %>">
|
||||
<%= link_to quantity, edit_quantity_path(quantity), class: 'link',
|
||||
onclick: 'this.blur();', data: {turbo_stream: true} %>
|
||||
</td>
|
||||
<td><%= quantity.description %></td>
|
||||
<td><%= quantity.description %>
|
||||
|
||||
<% if current_user.at_least(:active) %>
|
||||
<td class="flex">
|
||||
<%= image_link_to t('.new_subquantity'), 'plus-outline', new_quantity_path(quantity),
|
||||
id: dom_id(quantity, :new, :link), onclick: 'this.blur();', data: {turbo_stream: true} %>
|
||||
<%= image_link_to t('.new_subquantity'), 'plus-outline',
|
||||
new_quantity_path(quantity), id: dom_target(:new, quantity, :link),
|
||||
onclick: 'this.blur();', data: {turbo_stream: true} %>
|
||||
|
||||
<%= image_button_to_if quantity.destroyable?, t('.destroy'), 'delete-outline',
|
||||
quantity_path(quantity), method: :delete %>
|
||||
</td>
|
||||
<td class="handle" draggable="true">⠿</td>
|
||||
|
||||
<td class="handle" draggable="true">⠿
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user