1
0

Added JS layout

This commit is contained in:
cryptogopher
2020-02-22 22:51:15 +01:00
parent 2d778c831b
commit f65569528d
20 changed files with 2 additions and 19 deletions

View File

@@ -1,3 +1,2 @@
<%= render partial: 'body_trackers/flash' %>
$('#new-quantity').empty();
$('#quantities').html('<%= j render partial: 'quantities/index' %>');

View File

@@ -1,2 +1 @@
<%= render partial: 'body_trackers/flash' %>
$('#quantities').html('<%= j render partial: 'quantities/index' %>');

View File

@@ -1,4 +1,3 @@
<%= render partial: 'body_trackers/flash' %>
<% if @quantity.destroyed? %>
<% @quantity_tree.each do |q| %>
$('tr[id=quantity-<%= q.id %>]').nextUntil('tr.quantity').addBack().remove();

View File

@@ -1,4 +1,3 @@
<%= render partial: 'body_trackers/flash' %>
$('tr[id=quantity-<%= @quantity.id %>]').nextUntil('tr.quantity').remove();
var columns = $('table > thead > tr > th').length;
$('tr[id=quantity-<%= @quantity.id %>]').nextUntil('tr.quantity').addBack().after(

View File

@@ -1,4 +1,2 @@
$('div[id^=flash_]').remove();
$('#content').prepend('<%= escape_javascript(render_flash_messages) %>');
$('#quantities').html('<%= escape_javascript(render partial: 'quantities/index') %>');
$('#quantity_domain').trigger('change');

View File

@@ -1,2 +1 @@
<%= render partial: 'body_trackers/flash' %>
$('#new-quantity').html('<%= j render partial: 'quantities/new_form' %>');

View File

@@ -1,4 +1,3 @@
<%= 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 %>]').nextUntil('tr.quantity').addBack().after(