From cc78e8b58b2585a552ee5740187c694e03dd5c63 Mon Sep 17 00:00:00 2001 From: bsag Date: Fri, 26 Aug 2005 18:28:03 +0000 Subject: [PATCH] Applied lolindrath's patch to fix #73: next actions which were completed yesterday now show up correctly in the 'Completed in the last 7 days' box on the completed action view. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@139 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/todo_controller.rb | 10 +++++----- tracks/app/views/shared/add_new_item_form.rhtml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index 69700d92..865e4f30 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -35,11 +35,11 @@ class TodoController < ApplicationController day = (60 * 60 * 24) today = Time.now - today_date = today - 1 * day - week_begin = today - 2 * day - week_end = today - 7* day - month_begin = today - 8 * day - month_end = today - 31 * day + today_date = today - (1 * day) + week_begin = today - (1 * day) + week_end = today - (7 * day) + month_begin = today - (8 * day) + month_end = today - (31 * day) @done_today = @done.collect { |x| today_date <= x.completed ? x:nil }.compact @done_this_week = @done.collect { |x| week_begin >= x.completed && week_end <= x.completed ? x:nil }.compact diff --git a/tracks/app/views/shared/add_new_item_form.rhtml b/tracks/app/views/shared/add_new_item_form.rhtml index 34d32b9f..6d5a1655 100644 --- a/tracks/app/views/shared/add_new_item_form.rhtml +++ b/tracks/app/views/shared/add_new_item_form.rhtml @@ -20,7 +20,7 @@ :url => { :controller => "todo", :action => "add_item" }, :update => "new_actions", :position=> "bottom", - :complete => "Form.focusFirstElement('todo-form-new-action');Form.reset('todo-form-new-action')", + :complete => "Form.focusFirstElement('todo-form-new-action');Form.reset('todo-form-new-action');", :html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form' }) %>