Automatically focus several form fields.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2295 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-01-22 16:34:54 +00:00
parent dfab202cde
commit 4972084345
4 changed files with 4 additions and 3 deletions

View File

@ -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>

View File

@ -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;">

View File

@ -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;">

View File

@ -13,4 +13,5 @@
</fieldset>
<%= submit_tag l(:button_save) %>
<%= javascript_tag "Form.Element.focus('project_name');" %>
<% end %>