diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 7c513715..fb36c4ee 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -409,18 +409,6 @@ module TodosHelper return html end - def reset_tab_index - $tracks_tab_index = 0 - end - - def next_tab_index - # make sure it exists if reset was not called. Set to 20 to avoid clashes with existing form in sidebar - $tracks_tab_index ||= 20 - - $tracks_tab_index = $tracks_tab_index + 1 - return $tracks_tab_index - end - def feed_content_for_todo(todo) item_notes = todo.notes ? todo.rendered_notes : '' due = todo.due ? content_tag(:div, t('todos.feeds.due', :date => format_date(todo.due))) : '' diff --git a/app/views/contexts/_context_form.html.erb b/app/views/contexts/_context_form.html.erb index 35648f60..2f08057d 100644 --- a/app/views/contexts/_context_form.html.erb +++ b/app/views/contexts/_context_form.html.erb @@ -10,17 +10,17 @@
<%= get_list_of_error_messages_for(context) %>

- <%= text_field('context', 'name', :class => 'context-name', :tabindex => next_tab_index) %>
+ <%= text_field('context', 'name', :class => 'context-name') %>

<% ['active', 'hidden', 'closed'].each do | state | %> - <%= radio_button(:context, 'state', state, {:tabindex => next_tab_index}) %> <%= state.titlecase %> + <%= radio_button(:context, 'state', state) %> <%= state.titlecase %> <% end %>

- diff --git a/app/views/contexts/_new_context_form.html.erb b/app/views/contexts/_new_context_form.html.erb index d32a6336..81aa498d 100644 --- a/app/views/contexts/_new_context_form.html.erb +++ b/app/views/contexts/_new_context_form.html.erb @@ -1,4 +1,3 @@ -<%- reset_tab_index %>

- <%= text_field( "context", "name", :tabindex => next_tab_index ) %>
+ <%= text_field( "context", "name" ) %>
- <%= check_box( "context_state", "hide", {:tabindex => next_tab_index} ) %>
+ <%= check_box( "context_state", "hide" ) %>
diff --git a/app/views/notes/_note_edit_form.html.erb b/app/views/notes/_note_edit_form.html.erb index 9004e3c2..ec5dc04c 100644 --- a/app/views/notes/_note_edit_form.html.erb +++ b/app/views/notes/_note_edit_form.html.erb @@ -10,11 +10,11 @@ form_for(note, :html => {
<%= get_list_of_error_messages_for(note) %>
<%= f.hidden_field( "project_id" ) %> - <%= f.text_area( "body", "cols" => 70, "rows" => 15, "tabindex" => 1 ) %> + <%= f.text_area( "body", "cols" => 70, "rows" => 15) %>
- diff --git a/app/views/projects/_new_project_form.html.erb b/app/views/projects/_new_project_form.html.erb index d0e90f71..566b605b 100644 --- a/app/views/projects/_new_project_form.html.erb +++ b/app/views/projects/_new_project_form.html.erb @@ -1,4 +1,3 @@ -<%- reset_tab_index %>
-
+
<% end -%>
diff --git a/app/views/projects/_project_form.html.erb b/app/views/projects/_project_form.html.erb index f1910893..e220c9ad 100644 --- a/app/views/projects/_project_form.html.erb +++ b/app/views/projects/_project_form.html.erb @@ -11,28 +11,28 @@ project = project_form <%= source_view_tag( @source_view ) -%>
- <%= text_field :project, 'name', :class => 'project-name', :tabindex => next_tab_index %>
+ <%= text_field :project, 'name', :class => 'project-name' %>

- <%= text_area :project, 'description', "cols" => 30, "rows" => 4, :class => 'project-description', :tabindex => next_tab_index %>
+ <%= text_area :project, 'description', "cols" => 30, "rows" => 4, :class => 'project-description' %>

<% ['active', 'hidden', 'completed'].each do | state | %> - <%= radio_button(:project, 'state', state, {:tabindex => next_tab_index}) %> <%= state.titlecase %> + <%= radio_button(:project, 'state', state) %> <%= state.titlecase %> <% end %>

- <%= text_field_tag("project[default_context_name]", project.default_context.name, {:tabindex=>next_tab_index,:size=> 25}) %> + <%= text_field_tag("project[default_context_name]", project.default_context.name, {:size=> 25}) %>

- <%= text_field_tag("project[default_tags]", project.default_tags, {:tabindex=>next_tab_index,:size=> 25}) %> + <%= text_field_tag("project[default_tags]", project.default_tags, {:size=> 25}) %>
- diff --git a/app/views/shared/_add_new_item_form.html.erb b/app/views/shared/_add_new_item_form.html.erb index d8e3b9a7..e592540a 100644 --- a/app/views/shared/_add_new_item_form.html.erb +++ b/app/views/shared/_add_new_item_form.html.erb @@ -6,7 +6,6 @@ @initial_project_name = @project.name unless @project.nil? @initial_tags ||= @default_tags @initial_tags ||= @project.default_tags unless @project.nil? -reset_tab_index -%>
diff --git a/app/views/todos/_edit_form.html.erb b/app/views/todos/_edit_form.html.erb index 4444aca0..66b5bd62 100644 --- a/app/views/todos/_edit_form.html.erb +++ b/app/views/todos/_edit_form.html.erb @@ -15,27 +15,27 @@ <%= content_tag(:input, "", :type=>"hidden", :name=>"_tag_name", :value=>"#{@tag_name}") if @tag_name -%> - <%= t.text_field( "description", "size" => 30, "tabindex" => next_tab_index, "maxlength" => 100) %> + <%= t.text_field( "description", "size" => 30, "maxlength" => 100) %> - <%= t.text_area( "notes", "cols" => 29, "rows" => 4, "tabindex" => next_tab_index) %> + <%= t.text_area( "notes", "cols" => 29, "rows" => 4) %>
- +
- +
- <%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30, :tabindex => next_tab_index %> + <%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30 %>
- <%= date_field_tag("todo[due]", dom_id(@todo, 'due'), format_date(@todo.due), "tabindex" => next_tab_index) %> + <%= date_field_tag("todo[due]", dom_id(@todo, 'due'), format_date(@todo.due)) %> <%= image_tag("blank.png", :alt => t('todos.clear_due_date'), :class => "delete_item") %> @@ -43,7 +43,7 @@
- <%= date_field_tag("todo[show_from]", dom_id(@todo, 'show_from'), format_date(@todo.show_from), "tabindex" => next_tab_index) %> + <%= date_field_tag("todo[show_from]", dom_id(@todo, 'show_from'), format_date(@todo.show_from)) %> <%= image_tag("blank.png", :alt => t('todos.clear_show_from_date'), :class => "delete_item") %> @@ -56,14 +56,14 @@
- <%= text_field_tag "predecessor_input", nil, :size => 30, :tabindex => next_tab_index %> + <%= text_field_tag "predecessor_input", nil, :size => 30 %> <%= hidden_field_tag "predecessor_list", @todo.predecessors.map{|t| t.id.to_s}.join(', ') %>
- diff --git a/app/views/todos/_edit_form.m.erb b/app/views/todos/_edit_form.m.erb index dd08b1e9..2f368d61 100644 --- a/app/views/todos/_edit_form.m.erb +++ b/app/views/todos/_edit_form.m.erb @@ -4,34 +4,34 @@ <%= get_list_of_error_messages_for(@todo) if @todo %>

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

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

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

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

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

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

<%= date_select("todo", "show_from", {:order => [:day, :month, :year], - :start_year => Date.current.year, :include_blank => true}, :tabindex => 7) %> + :start_year => Date.current.year, :include_blank => true}) %> diff --git a/app/views/todos/_new_multi_todo_form.html.erb b/app/views/todos/_new_multi_todo_form.html.erb index 1330999a..1e30579a 100644 --- a/app/views/todos/_new_multi_todo_form.html.erb +++ b/app/views/todos/_new_multi_todo_form.html.erb @@ -16,27 +16,27 @@
- <%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6, :tabindex => next_tab_index) %> + <%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6 ) %> - + - + <%= hidden_field_tag "initial_tag_list", @initial_tags%> - <%= text_field_tag "multi_tag_list", @initial_tags, :name=>:tag_list, :size => 30, :tabindex => next_tab_index %> + <%= text_field_tag "multi_tag_list", @initial_tags, :name=>:tag_list, :size => 30 %> <%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %> - <%= check_box_tag('todos_sequential', 'true', false, {:tabindex => next_tab_index}) %> + <%= check_box_tag('todos_sequential', 'true', false) %>
-
diff --git a/app/views/todos/_new_todo_form.html.erb b/app/views/todos/_new_todo_form.html.erb index bc616a86..b9bb4b4a 100644 --- a/app/views/todos/_new_todo_form.html.erb +++ b/app/views/todos/_new_todo_form.html.erb @@ -12,31 +12,31 @@ <%= image_tag("blank.png", :title =>t('todos.star_action'), :class => "todo_star", :style=> "float: right")%> - <%= t.text_field("description", "size" => 30, "tabindex" => next_tab_index, "maxlength" => 100, "autocomplete" => "off", :autofocus => 1) %> + <%= t.text_field("description", "size" => 30, "maxlength" => 100, "autocomplete" => "off", :autofocus => 1) %> - <%= t.text_area("notes", "cols" => 29, "rows" => 6, "tabindex" => next_tab_index) %> + <%= t.text_area("notes", "cols" => 29, "rows" => 6) %> - + - + <%= hidden_field_tag "initial_tag_list", @initial_tags%> - <%= text_field_tag "tag_list", @initial_tags, :size => 30, :tabindex => next_tab_index %> + <%= text_field_tag "tag_list", @initial_tags, :size => 30 %> <%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
- <%= t.text_field("due", "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off") %> + <%= t.text_field("due", "size" => 12, "class" => "Date", "autocomplete" => "off") %>
- <%= t.text_field("show_from", "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off") %> + <%= t.text_field("show_from", "size" => 12, "class" => "Date", "autocomplete" => "off") %>
@@ -46,7 +46,7 @@
- <%= text_field_tag "predecessor_input", nil, :size => 30, :tabindex => next_tab_index %> + <%= text_field_tag "predecessor_input", nil, :size => 30 %> <%= hidden_field_tag "predecessor_list", ""%>
@@ -55,7 +55,7 @@
-
diff --git a/app/views/todos/edit.m.erb b/app/views/todos/edit.m.erb index 8f8d98a7..9b3678d5 100644 --- a/app/views/todos/edit.m.erb +++ b/app/views/todos/edit.m.erb @@ -1,5 +1,5 @@ <%= form_tag todo_path(@todo, :format => 'm'), :name => 'mobileEdit', :method => :put do %> <%= render :partial => 'edit_form', :locals => { :parent_container_type => "show_mobile" } %> -

+

<% end -%> <%= link_to t('common.cancel'), @return_path %> diff --git a/app/views/todos/new.m.erb b/app/views/todos/new.m.erb index 028b9301..8cfc46cf 100644 --- a/app/views/todos/new.m.erb +++ b/app/views/todos/new.m.erb @@ -1,5 +1,5 @@ <%= form_tag todos_path(:format => 'm'), :method => :post do %> <%= render :partial => 'edit_form' %> -

+

<% end -%> <%= link_to t('common.back'), @return_path %>