Added JS layout
This commit is contained in:
parent
2d778c831b
commit
f65569528d
@ -55,6 +55,7 @@ class QuantitiesController < BodyTrackingPluginController
|
||||
def parents
|
||||
@form = params[:form]
|
||||
@domain = params[:quantity][:domain]
|
||||
render layout: false
|
||||
end
|
||||
|
||||
def move
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#new-ingredient').empty();
|
||||
<% if current_view == :nutrients %>
|
||||
$('#nutrients').html('<%= j render partial: 'ingredients/nutrients' %>');
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
<% if @ingredient.destroyed? %>
|
||||
$('tr[id=ingredient-<%= @ingredient.id %>]').nextUntil('tr.primary').addBack().remove();
|
||||
<% end %>
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('tr[id=ingredient-<%= @ingredient.id %>]').nextUntil('tr.primary', ':not(.ingredient)')
|
||||
.remove();
|
||||
var columns = $('table > thead > tr > th').length;
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
<% if current_view == :nutrients %>
|
||||
$('#nutrients').html('<%= j render partial: 'ingredients/nutrients' %>');
|
||||
<% else %>
|
||||
|
@ -1,2 +1 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#new-ingredient').html('<%= j render partial: 'ingredients/new_form' %>');
|
||||
|
@ -1,2 +1 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#ingredients').html('<%= j render partial: 'ingredients/index' %>');
|
||||
|
@ -1,2 +1,3 @@
|
||||
$('div[id^=flash_]').remove();
|
||||
$('#content').prepend('<%= j render_flash_messages %>');
|
||||
<%= yield %>
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#new-measurement').empty();
|
||||
<% if defined? @quantities %>
|
||||
$('#readouts').html('<%= j render partial: 'measurements/readouts' %>');
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
<% if @measurement.destroyed? %>
|
||||
$('tr[id=measurement-<%= @measurement.id %>]').nextUntil('tr.primary').addBack().remove();
|
||||
<% end %>
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('tr[id=measurement-<%= @measurement.id %>]').nextUntil('tr.primary', ':not(.measurement)')
|
||||
.remove();
|
||||
var columns = $('table > thead > tr > th').length;
|
||||
|
@ -1,4 +1,3 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
<% if defined? @quantities %>
|
||||
$('#readouts').html('<%= j render partial: 'measurements/readouts' %>');
|
||||
<% else %>
|
||||
|
@ -1,2 +1 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#new-measurement').html('<%= j render partial: 'measurements/new_form' %>');
|
||||
|
@ -1,3 +1,2 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#new-quantity').empty();
|
||||
$('#quantities').html('<%= j render partial: 'quantities/index' %>');
|
||||
|
@ -1,2 +1 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#quantities').html('<%= j render partial: 'quantities/index' %>');
|
||||
|
@ -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();
|
||||
|
@ -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(
|
||||
|
@ -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');
|
||||
|
@ -1,2 +1 @@
|
||||
<%= render partial: 'body_trackers/flash' %>
|
||||
$('#new-quantity').html('<%= j render partial: 'quantities/new_form' %>');
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user