summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-05 20:13:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-05 20:13:06 +0000
commit0803e6fcaabe15f3e87c44f0404de4be09484b8e (patch)
treea9a76dc647ad05ebc53d4503f620396a052e06c8
parent1b2e80545a20f3dc19225991536f1c8d85c74665 (diff)
downloadredmine-0803e6fcaabe15f3e87c44f0404de4be09484b8e.tar.gz
redmine-0803e6fcaabe15f3e87c44f0404de4be09484b8e.zip
Search field automatically focused.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@707 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/search/index.rhtml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml
index 66b89743f..082527373 100644
--- a/app/views/search/index.rhtml
+++ b/app/views/search/index.rhtml
@@ -2,7 +2,8 @@
<div class="box">
<% form_tag({}, :method => :get) do %>
-<p><%= text_field_tag 'q', @question, :size => 30 %>
+<p><%= text_field_tag 'q', @question, :size => 30, :id => 'search-input' %>
+<%= javascript_tag "Field.focus('search-input')" %>
<% if @project %>
<%= check_box_tag 'scope[]', 'issues', (@scope.include? 'issues') %> <label><%= l(:label_issue_plural) %></label>
@@ -62,4 +63,4 @@
</p></li>
<% end %>
</ul>
-<% end %> \ No newline at end of file
+<% end %>