diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 5c846752..05e68079 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -411,7 +411,16 @@ module TodosHelper html += "}}) " * animation.size return html + ";" end - + + def reset_tab_index + $tracks_tab_index = 0 + end + + def next_tab_index + $tracks_tab_index = $tracks_tab_index + 1 + return $tracks_tab_index + end + private def image_tag_for_star(todo) diff --git a/app/views/contexts/_context_form.rhtml b/app/views/contexts/_context_form.rhtml index 952e8a44..92bd39aa 100644 --- a/app/views/contexts/_context_form.rhtml +++ b/app/views/contexts/_context_form.rhtml @@ -12,15 +12,15 @@
- <%= text_field('context', 'name', :class => 'context-name') %>
+ <%= text_field('context', 'name', :class => 'context-name', :tabindex => next_tab_index) %>
- <%= check_box('context', 'hide', :class => 'context-hide') %> + <%= check_box('context', 'hide', {:class => 'context-hide', :tabindex => next_tab_index}) %>
- diff --git a/app/views/contexts/_new_context_form.rhtml b/app/views/contexts/_new_context_form.rhtml index 26bde0ba..26d65348 100644 --- a/app/views/contexts/_new_context_form.rhtml +++ b/app/views/contexts/_new_context_form.rhtml @@ -1,3 +1,4 @@ +<%- reset_tab_index %>