From 33e96dd42e7fbd9cc230f09ba01e2b0c28c663f1 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Mon, 30 Mar 2009 23:01:17 +0200 Subject: [PATCH] move js of template to the bottom of the page and migrate toggle js to jquery yslow states that loading of page is faster when js is at the bottom --- app/views/layouts/standard.html.erb | 64 +++++++++++++++-------------- app/views/todos/_toggle_notes.rhtml | 4 +- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/app/views/layouts/standard.html.erb b/app/views/layouts/standard.html.erb index 0ee34aa6..ecf6a034 100644 --- a/app/views/layouts/standard.html.erb +++ b/app/views/layouts/standard.html.erb @@ -21,33 +21,6 @@ <%= auto_discovery_link_tag(:rss, {:controller => "todos", :action => "index", :format => 'rss', :token => "#{current_user.token}"}, {:title => "RSS feed of next actions"}) %> - - <%= @page_title %> @@ -62,10 +35,8 @@ <%= render :partial => "shared/footer" %> + + diff --git a/app/views/todos/_toggle_notes.rhtml b/app/views/todos/_toggle_notes.rhtml index 52f279a1..61cfca64 100644 --- a/app/views/todos/_toggle_notes.rhtml +++ b/app/views/todos/_toggle_notes.rhtml @@ -1,7 +1,5 @@ <%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_notes', :title => 'Show notes'}) %> -<% apply_behavior 'a.show_notes:click', :prevent_default => true do |page, element| - element.next('.todo_notes').toggle -end -%> + \ No newline at end of file