Re-wrote todo-items.js and got todo uncheck working.

I also discovered that application.js was getting included twice, causing a few issues. Small fix in standard.html.erb took care of it.
This commit is contained in:
Eric Allen 2009-09-06 19:41:27 -04:00
parent cd8a01d2d4
commit 6b7e5d0eed
4 changed files with 74 additions and 174 deletions

View file

@ -10,12 +10,12 @@
toggleTarget = containerElem.down('.toggle_target')
if (Element.visible(toggleTarget))
{
todoItems.collapseNextActionListing(this, toggleTarget);
todoItems.collapseNextActionListing(toggleTarget);
$.cookie(todoItems.buildCookieName(containerElem), true);
}
else
{
todoItems.expandNextActionListing(this, toggleTarget);
todoItems.expandNextActionListing(toggleTarget);
$.cookie(todoItems.buildCookieName(containerElem), null);
}
}

View file

@ -10,13 +10,14 @@
<% end %>
<%= stylesheet_link_tag "print", :media => "print" %>
<% bundle :name => "jquery" do %>
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'jquery' %>
<%= javascript_include_tag 'jquery-ui' %>
<%= javascript_include_tag 'jquery.cookie' %>
<% end %>
<% bundle :name => "tracks_js" do %>
<%= javascript_include_tag *%w[
hoverIntent superfish application
accesskey-hints todo-items niftycube
accesskey-hints niftycube
protoload flashobject ] %>
<% end %>
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>