<%= 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>
<%= 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;">
<%= 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;">
</fieldset>
<%= submit_tag l(:button_save) %>
+<%= javascript_tag "Form.Element.focus('project_name');" %>
<% end %>