From 39b8cc763bfda50d6f826c7d37a5669f8ba5a41d Mon Sep 17 00:00:00 2001 From: bsag Date: Sun, 24 Dec 2006 16:30:36 +0000 Subject: [PATCH] Removed the defunct 'date_preview' stuff, because accidental typing of characters in the date box was leading to spurious Server error warning appearing, which was confusing and annoying. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@381 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/todo_controller.rb | 14 +------------- tracks/app/views/shared/_add_new_item_form.rhtml | 8 -------- tracks/app/views/shared/_date_preview.rhtml | 1 - tracks/app/views/todo/date_preview.rhtml | 0 4 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 tracks/app/views/shared/_date_preview.rhtml delete mode 100644 tracks/app/views/todo/date_preview.rhtml diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index b9804e54..17e5028f 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -3,7 +3,7 @@ class TodoController < ApplicationController helper :todo append_before_filter :init, :except => [ :destroy, :completed, :completed_archive, :check_tickler ] - layout 'standard', :except => :date_preview + layout 'standard' # Main method for listing tasks # Set page title, and fill variables with contexts and done and not-done tasks @@ -33,18 +33,6 @@ class TodoController < ApplicationController wants.xml { render :action => 'list.rxml', :layout => false } end end - - def date_preview - return if params["todo_due"].blank? - @date = parse_date_per_user_prefs(params["todo_due"]) - - if @date.nil? - @form_date = "Invalid date" - else - @form_date = @date.strftime("%a %b %d %Y") - end - render :partial => "shared/date_preview", :layout => false - end def create @item = @user.todos.build diff --git a/tracks/app/views/shared/_add_new_item_form.rhtml b/tracks/app/views/shared/_add_new_item_form.rhtml index cad1a981..48fc4ec7 100644 --- a/tracks/app/views/shared/_add_new_item_form.rhtml +++ b/tracks/app/views/shared/_add_new_item_form.rhtml @@ -51,18 +51,10 @@ Event.observe($('todo_project_name'), "click", projectAutoCompleter.activate.bin

<%= text_field("todo", "show_from", "size" => 10, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %>
- - <%= source_view_tag( @source_view ) %> <% end -%> -<%= observe_field "todo_due", - :frequency => 2, - :update => "date-preview", - :with => "todo_due", - :complete => "Element.show('date-preview')", - :url => { :controller => "todo", :action => "date_preview" } %> <%= calendar_setup( "todo_due" ) %> <%= calendar_setup( "todo_show_from" ) %> diff --git a/tracks/app/views/shared/_date_preview.rhtml b/tracks/app/views/shared/_date_preview.rhtml deleted file mode 100644 index 3dbbb4c8..00000000 --- a/tracks/app/views/shared/_date_preview.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= @form_date %> \ No newline at end of file diff --git a/tracks/app/views/todo/date_preview.rhtml b/tracks/app/views/todo/date_preview.rhtml deleted file mode 100644 index e69de29b..00000000