From fac5e7ca8363323e77c9e43f0a6cba3d9b8ce629 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Wed, 2 Sep 2009 11:04:28 -0400 Subject: [PATCH] No more CookieManager since it's dependent on Prototype --- app/views/contexts/_context.rhtml | 4 +- app/views/layouts/standard.html.erb | 1 + app/views/login/login.html.erb | 2 +- public/javascripts/application.js | 125 +--------------------------- public/javascripts/jquery.cookie.js | 96 +++++++++++++++++++++ public/javascripts/todo-items.js | 9 +- 6 files changed, 106 insertions(+), 131 deletions(-) create mode 100644 public/javascripts/jquery.cookie.js diff --git a/app/views/contexts/_context.rhtml b/app/views/contexts/_context.rhtml index fafe99fe..fb8f7408 100644 --- a/app/views/contexts/_context.rhtml +++ b/app/views/contexts/_context.rhtml @@ -11,12 +11,12 @@ if (Element.visible(toggleTarget)) { todoItems.collapseNextActionListing(this, toggleTarget); - todoItems.contextCollapseCookieManager.setCookie(todoItems.buildCookieName(containerElem), true) + $.cookie(todoItems.buildCookieName(containerElem), true); } else { todoItems.expandNextActionListing(this, toggleTarget); - todoItems.contextCollapseCookieManager.clearCookie(todoItems.buildCookieName(containerElem)) + $.cookie(todoItems.buildCookieName(containerElem), null); } } " diff --git a/app/views/layouts/standard.html.erb b/app/views/layouts/standard.html.erb index 25384471..89609e05 100644 --- a/app/views/layouts/standard.html.erb +++ b/app/views/layouts/standard.html.erb @@ -11,6 +11,7 @@ <%= stylesheet_link_tag "print", :media => "print" %> <% bundle :name => "jquery" do %> <%= javascript_include_tag :defaults %> + <%= javascript_include_tag 'jquery.cookie' %> <% end %> <% bundle :name => "tracks_js" do %> <%= javascript_include_tag *%w[ diff --git a/app/views/login/login.html.erb b/app/views/login/login.html.erb index 7c76f964..5e3ef339 100644 --- a/app/views/login/login.html.erb +++ b/app/views/login/login.html.erb @@ -61,7 +61,7 @@