From 77bed1e80b681030ca109fec4ad1d3349de9a74b Mon Sep 17 00:00:00 2001 From: lukemelia Date: Fri, 8 Jun 2007 04:57:09 +0000 Subject: [PATCH] Remove default context of "Create a new context" when no contexts exist. i.e. a new user. Closes #511. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@555 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/helpers/todos_helper.rb | 2 +- tracks/app/views/shared/_add_new_item_form.rhtml | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tracks/app/helpers/todos_helper.rb b/tracks/app/helpers/todos_helper.rb index c6dc966c..593b26a3 100644 --- a/tracks/app/helpers/todos_helper.rb +++ b/tracks/app/helpers/todos_helper.rb @@ -192,7 +192,7 @@ module TodosHelper end def context_names_for_autocomplete - return array_or_string_for_javascript(['Create a new context']) if @contexts.empty? + #return array_or_string_for_javascript(['Create a new context']) if @contexts.empty? array_or_string_for_javascript( @contexts.collect{|c| escape_javascript(c.name) } ) end diff --git a/tracks/app/views/shared/_add_new_item_form.rhtml b/tracks/app/views/shared/_add_new_item_form.rhtml index bad4ff74..c0ddc9ae 100644 --- a/tracks/app/views/shared/_add_new_item_form.rhtml +++ b/tracks/app/views/shared/_add_new_item_form.rhtml @@ -56,11 +56,14 @@ Event.observe($('todo_project_name'), "blur", selectDefaultContext.bind($('todo_