From c7cd46ee1d4dd9665f35fde48dedd3584775af2b Mon Sep 17 00:00:00 2001 From: Tim Madden Date: Tue, 22 Nov 2011 09:46:44 -0600 Subject: [PATCH] update to mobile todo edit view removing the done checkout (with new intermediate mobile todo view with done button, this is needed) rearranging fields to put the most important fields first --- app/views/todos/_edit_mobile_form.rhtml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/app/views/todos/_edit_mobile_form.rhtml b/app/views/todos/_edit_mobile_form.rhtml index 63ede714..df130e65 100644 --- a/app/views/todos/_edit_mobile_form.rhtml +++ b/app/views/todos/_edit_mobile_form.rhtml @@ -4,37 +4,34 @@ <%= error_messages_for("todo") %> <% this_year = current_user.time.to_date.strftime("%Y").to_i -%> -<% if parent_container_type == 'show_mobile' -%> -

 <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1, "onClick" => "document.mobileEdit.submit()") %>

-<% end -%>

-<%= text_field( "todo", "description", "tabindex" => 2, "maxlength" => 100, "size" => 50) %> -

-<%= text_area( "todo", "notes", "cols" => 40, "rows" => 3, "tabindex" => 3) %> +<%= text_field( "todo", "description", "tabindex" => 1, "maxlength" => 100, "size" => 50) %> +

+<%= text_field_tag "tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>

<%= unless @mobile_from_context - collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 4} ) + collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 3} ) else select_tag("todo[context_id]", options_from_collection_for_select( @contexts, "id", "name", @mobile_from_context.id), - {"id" => :todo_context_id, :tabindex => 4} ) + {"id" => :todo_context_id, :tabindex => 3} ) end %>

<%= unless @mobile_from_project collection_select( "todo", "project_id", @projects, "id", "name", - {:include_blank => t('todos.no_project')}, {"tabindex" => 5} ) + {:include_blank => t('todos.no_project')}, {"tabindex" => 4} ) else # manually add blank option since :include_blank does not work # with options_from_collection_for_select select_tag("todo[project_id]", ""+options_from_collection_for_select( @projects, "id", "name", @mobile_from_project.id), - {"id" => :todo_project_id, :tabindex => 5} ) + {"id" => :todo_project_id, :tabindex => 4} ) end %> -

-<%= text_field_tag "tag_list", @tag_list_text, :size => 50, :tabindex => 6 %> +

+<%= text_area( "todo", "notes", "cols" => 40, "rows" => 3, "tabindex" => 5) %>

<%= date_select("todo", "due", {:order => [:day, :month, :year], - :start_year => this_year, :include_blank => '--'}, :tabindex => 7) %> + :start_year => this_year, :include_blank => '--'}, :tabindex => 6) %>

<%= date_select("todo", "show_from", {:order => [:day, :month, :year], - :start_year => this_year, :include_blank => true}, :tabindex => 8) %> + :start_year => this_year, :include_blank => true}, :tabindex => 7) %>