From 020c4e30ea96445cf599f7f800074a4e8a62567a Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Sat, 2 Nov 2019 23:53:36 +0100 Subject: [PATCH] Changed showAndScrollTo -> show + focus --- app/views/ingredients/_contextual.html.erb | 4 ++-- app/views/quantities/index.html.erb | 2 +- app/views/sources/index.html.erb | 2 +- app/views/units/index.html.erb | 2 +- assets/stylesheets/body_tracking.css | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/ingredients/_contextual.html.erb b/app/views/ingredients/_contextual.html.erb index 08dd2ae..4d50933 100644 --- a/app/views/ingredients/_contextual.html.erb +++ b/app/views/ingredients/_contextual.html.erb @@ -1,6 +1,6 @@ <% if User.current.allowed_to?(:manage_common, @project) %> <%= link_to t(".heading_import_ingredients"), '#', :class => 'icon icon-multiple', - :onclick => 'showAndScrollTo("import-ingredients", "filename"); return false;' %> + :onclick => '$("#import-ingredients").show(); $("#filename").focus(); return false;' %> <%= link_to t(".heading_new_ingredient"), '#', :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-ingredient", "ingredient_name"); return false;' %> + :onclick => '$("#add-ingredient").show(); $("#ingredient_name").focus(); return false;' %> <% end %> diff --git a/app/views/quantities/index.html.erb b/app/views/quantities/index.html.erb index 91f0868..ae0b998 100644 --- a/app/views/quantities/index.html.erb +++ b/app/views/quantities/index.html.erb @@ -5,7 +5,7 @@
<% if User.current.allowed_to?(:manage_common, @project) %> <%= link_to t(".heading_new_quantity"), '#', :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-quantity", "quantity_name"); return false;' %> + :onclick => '$("#add-quantity").show(); $("#quantity_name").focus(); return false;' %> <% end %>
diff --git a/app/views/sources/index.html.erb b/app/views/sources/index.html.erb index 4ba91dc..b3f100b 100644 --- a/app/views/sources/index.html.erb +++ b/app/views/sources/index.html.erb @@ -5,7 +5,7 @@
<% if User.current.allowed_to?(:manage_common, @project) %> <%= link_to t(".heading_new_source"), '#', :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-source", "source_name"); return false;' %> + :onclick => '$("#add-source").show(); $("#source_name").focus(); return false;' %> <% end %>
diff --git a/app/views/units/index.html.erb b/app/views/units/index.html.erb index 531ea0b..1d409da 100644 --- a/app/views/units/index.html.erb +++ b/app/views/units/index.html.erb @@ -5,7 +5,7 @@
<% if User.current.allowed_to?(:manage_common, @project) %> <%= link_to t(".heading_new_unit"), '#', :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-unit", "unit_shortname"); return false;' %> + :onclick => '$("#add-unit").show(); $("#unit_shortname").focus(); return false;' %> <% end %>
diff --git a/assets/stylesheets/body_tracking.css b/assets/stylesheets/body_tracking.css index da09caf..15d61fb 100644 --- a/assets/stylesheets/body_tracking.css +++ b/assets/stylesheets/body_tracking.css @@ -4,6 +4,7 @@ table.nutrients.list td.quantity {text-align: left; border-bottom: none;} table.nutrients.list td.space {border-top: none; border-bottom: none;} table.nutrients.list td.value {border-top: none;} table.list tr.ingredient.hidden {opacity: 0.4} +table.list td.name {white-space: nowrap;} table.list td.action, table.list td.value {text-align: right;} table.nutrients.list th,