summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-22 16:34:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-22 16:34:54 +0000
commit4972084345def0774b7d3d9892f47ed89e215e28 (patch)
tree0f8d705fa6ef6356ab240ad765399c1da1f432ac /app/views
parentdfab202cdec1e4cba0c10281142090c74ccabaf8 (diff)
downloadredmine-4972084345def0774b7d3d9892f47ed89e215e28.tar.gz
redmine-4972084345def0774b7d3d9892f47ed89e215e28.zip
Automatically focus several form fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2295 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/boards/show.rhtml2
-rw-r--r--app/views/documents/index.rhtml2
-rw-r--r--app/views/news/index.rhtml2
-rw-r--r--app/views/projects/add.rhtml1
4 files changed, 4 insertions, 3 deletions
diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml
index adf0b46b4..011a25e06 100644
--- a/app/views/boards/show.rhtml
+++ b/app/views/boards/show.rhtml
@@ -4,7 +4,7 @@
<%= link_to_if_authorized l(:label_message_new),
{:controller => 'messages', :action => 'new', :board_id => @board},
:class => 'icon icon-add',
- :onclick => 'Element.show("add-message"); return false;' %>
+ :onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
<%= watcher_tag(@board, User.current) %>
</div>
diff --git a/app/views/documents/index.rhtml b/app/views/documents/index.rhtml
index 14d997360..7449b67c6 100644
--- a/app/views/documents/index.rhtml
+++ b/app/views/documents/index.rhtml
@@ -2,7 +2,7 @@
<%= link_to_if_authorized l(:label_document_new),
{:controller => 'documents', :action => 'new', :project_id => @project},
:class => 'icon icon-add',
- :onclick => 'Element.show("add-document"); return false;' %>
+ :onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' %>
</div>
<div id="add-document" style="display:none;">
diff --git a/app/views/news/index.rhtml b/app/views/news/index.rhtml
index 9cac39002..ebc37432c 100644
--- a/app/views/news/index.rhtml
+++ b/app/views/news/index.rhtml
@@ -2,7 +2,7 @@
<%= link_to_if_authorized(l(:label_news_new),
{:controller => 'news', :action => 'new', :project_id => @project},
:class => 'icon icon-add',
- :onclick => 'Element.show("add-news"); return false;') if @project %>
+ :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project %>
</div>
<div id="add-news" style="display:none;">
diff --git a/app/views/projects/add.rhtml b/app/views/projects/add.rhtml
index bc3d7b09a..46ab1a9be 100644
--- a/app/views/projects/add.rhtml
+++ b/app/views/projects/add.rhtml
@@ -13,4 +13,5 @@
</fieldset>
<%= submit_tag l(:button_save) %>
+<%= javascript_tag "Form.Element.focus('project_name');" %>
<% end %>