1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/app/views/quantities/new_child.js.erb
2020-02-19 21:24:17 +01:00

9 lines
428 B
Plaintext

<%= render partial: 'body_trackers/flash' %>
$('tr[id=quantity-<%= @parent_quantity.id %>]').nextUntil('tr.quantity').remove();
var columns = $('table > thead > tr > th').length;
$('tr[id=quantity-<%= @parent_quantity.id %>]').nextAll('tr.quantity').first().before(
'<tr><td class="form" colspan="'+columns+'">' +
'<div id="new-child-quantity"><%= j render partial: "quantities/new_child_form" %></div>' +
'</td></tr>'
);