forked from fixin.me/fixin.me
Replace patched #dom_id with #dom_target
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<%# TODO: add readout reordering by dragging %>
|
||||
<%= tabular_fields_for 'readouts[]', readout do |form| %>
|
||||
<%- tag.tr id: dom_id(readout.quantity, :new, :readout) do %>
|
||||
<%- tag.tr id: dom_target(:new, readout.quantity, :readout) do %>
|
||||
<td>
|
||||
<%# TODO: add grayed readout index (in separate column?) %>
|
||||
<%= readout.quantity.relative_pathname(@superquantity) %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%= turbo_stream.update(:measurement_form_legend) { @superquantity&.pathname } %>
|
||||
|
||||
<% @prev_quantities.each do |pq| %>
|
||||
<%= turbo_stream.update dom_id(pq, nil, :pathname) do %>
|
||||
<%= turbo_stream.update dom_target(pq, :pathname) do %>
|
||||
<%= pq.relative_pathname(@superquantity) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= turbo_stream.disable :create_measurement_button if @prev_quantities.one? %>
|
||||
<%= turbo_stream.remove dom_id(@quantity, :new, :readout) %>
|
||||
<%= turbo_stream.remove dom_target(:new, @quantity, :readout) %>
|
||||
<%= render partial: 'form_repath' %>
|
||||
<%= turbo_stream.unselect dom_id(@quantity) %>
|
||||
<%= turbo_stream.unselect dom_target(@quantity) %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% @readouts.each do |r| %>
|
||||
<%= turbo_stream.disable dom_id(r.quantity) %>
|
||||
<%= turbo_stream.disable dom_target(r.quantity) %>
|
||||
<% end %>
|
||||
<%= render partial: 'form_repath' %>
|
||||
<%= turbo_stream.append :readouts do %>
|
||||
|
||||
Reference in New Issue
Block a user