1
0

Moved expand action from icon to TD

This commit is contained in:
cryptogopher 2019-10-31 23:42:48 +01:00
parent 611b2b799d
commit 09c441f662

View File

@ -28,12 +28,8 @@
<% row_class = "ingredient#{' hidden' if i.hidden} #{cycle('odd', 'even')}" %> <% row_class = "ingredient#{' hidden' if i.hidden} #{cycle('odd', 'even')}" %>
<tr id="ingredient-<%= i.id %>" class="primary <%= row_class %>"> <tr id="ingredient-<%= i.id %>" class="primary <%= row_class %>">
<td class="name"> <td class="name" style="cursor: pointer;" onclick="$(this).closest('tr').toggle(); $(this).closest('tr').nextUntil('tr.primary', 'tr').toggle(); return false;">
<%= link_to '', '#', { <span class="icon icon-bullet-closed"><%= i.name %></span>
onclick: "$(this).closest('tr').toggle(); $(this).closest('tr').nextUntil('tr.primary', 'tr').toggle(); return false;",
class: "icon icon-bullet-closed"
} %>
<%= i.name %>
</td> </td>
<% @primary_quantities.each do |q| %> <% @primary_quantities.each do |q| %>
<td class="primary value"> <td class="primary value">
@ -43,12 +39,8 @@
</tr> </tr>
<tr class="<%= row_class %>" style="display:none"> <tr class="<%= row_class %>" style="display:none">
<td class="name"> <td class="name" style="cursor: pointer;" onclick="$(this).closest('tr').prev('tr.primary').toggle(); $(this).closest('tr').prev('tr.primary').nextUntil('tr.primary', 'tr').toggle(); return false;">
<%= link_to '', '#', { <span class="icon icon-bullet-closed"><%= i.name %></span>
onclick: "$(this).closest('tr').prev('tr.primary').toggle(); $(this).closest('tr').prev('tr.primary').nextUntil('tr.primary', 'tr').toggle(); return false;",
class: "icon icon-bullet-open"
} %>
<%= i.name %>
</td> </td>
<% @primary_quantities.each do |q| %> <% @primary_quantities.each do |q| %>
<td class="primary quantity"> <td class="primary quantity">