From 0c161be46664858feac1ff362738712eb865a811 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Tue, 27 Apr 2010 11:16:56 -0400 Subject: [PATCH] Fix recurring todo autocompleteion * Enable rich interaction on edit (to trigger autocompleter) * Don't try to reset autocomplete lists, since they come from the server now Fixes #1022 --- app/views/recurring_todos/edit.js.rjs | 1 + app/views/recurring_todos/update.js.rjs | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/views/recurring_todos/edit.js.rjs b/app/views/recurring_todos/edit.js.rjs index 9b4706b1..2345f9b6 100644 --- a/app/views/recurring_todos/edit.js.rjs +++ b/app/views/recurring_todos/edit.js.rjs @@ -2,3 +2,4 @@ page << "TracksForm.toggle_overlay();" page['new-recurring-todo'].hide page['edit-recurring-todo'].replace_html :partial => 'recurring_todos/edit_form' page['edit-recurring-todo'].show +page << "enable_rich_interaction();" diff --git a/app/views/recurring_todos/update.js.rjs b/app/views/recurring_todos/update.js.rjs index ad35f1ef..626ba168 100644 --- a/app/views/recurring_todos/update.js.rjs +++ b/app/views/recurring_todos/update.js.rjs @@ -8,10 +8,6 @@ if @saved status_message = 'Added new context / ' + status_message if @new_context_created page.notify :notice, status_message, 5.0 - # update auto completer arrays for context and project - page << "contextAutoCompleter.options.array = #{context_names_for_autocomplete}; contextAutoCompleter.changed = true" if @new_context_created - page << "projectAutoCompleter.options.array = #{project_names_for_autocomplete}; projectAutoCompleter.changed = true" if @new_project_created - # replace old recurring todo with updated todo page.replace dom_id(@recurring_todo), :partial => 'recurring_todos/recurring_todo', :locals => { :recurring_todo => @recurring_todo } page.visual_effect :highlight, dom_id(@recurring_todo), :duration => 3 @@ -19,4 +15,4 @@ if @saved else page.show 'edit_status' page.replace_html 'edit_status', "#{error_messages_for('recurring_todo')}" -end \ No newline at end of file +end