Render collapse/expand buttons using CSS instead of JS

Fix #1354
Also clean up some dependent JS unused since c64e1bc
This commit is contained in:
Dan Rice 2012-11-14 22:01:43 -05:00
parent 416a8699d5
commit bdbb1dd29d
11 changed files with 18 additions and 53 deletions

View file

@ -7,7 +7,7 @@ cache [context, @source_view, current_user.date.strftime("%Y%m%d")] do
<div id="c<%= context.id %>" class="container context" style="display:<%= (collapsible && @not_done.empty?) ? "none" : "block" %>">
<h2>
<% if collapsible -%>
<a href="#" class="container_toggle" id="toggle_c<%= context.id %>"><%= image_tag("collapse.png") %></a>
<a href="#" class="container_toggle" id="toggle_c<%= context.id %>"><%= image_tag("blank.png", :alt => t('common.collapse_expand')) %></a>
<% end -%>
<% if source_view_is :context %>
<span id="context_name"><%= context.name %></span>
@ -23,4 +23,4 @@ cache [context, @source_view, current_user.date.strftime("%Y%m%d")] do
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "context" } %>
</div>
</div>
<% end %>
<% end %>