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:
parent
dfab202cde
commit
4972084345
|
@ -4,7 +4,7 @@
|
||||||
<%= link_to_if_authorized l(:label_message_new),
|
<%= link_to_if_authorized l(:label_message_new),
|
||||||
{:controller => 'messages', :action => 'new', :board_id => @board},
|
{:controller => 'messages', :action => 'new', :board_id => @board},
|
||||||
:class => 'icon icon-add',
|
: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) %>
|
<%= watcher_tag(@board, User.current) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<%= link_to_if_authorized l(:label_document_new),
|
<%= link_to_if_authorized l(:label_document_new),
|
||||||
{:controller => 'documents', :action => 'new', :project_id => @project},
|
{:controller => 'documents', :action => 'new', :project_id => @project},
|
||||||
:class => 'icon icon-add',
|
: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>
|
||||||
|
|
||||||
<div id="add-document" style="display:none;">
|
<div id="add-document" style="display:none;">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<%= link_to_if_authorized(l(:label_news_new),
|
<%= link_to_if_authorized(l(:label_news_new),
|
||||||
{:controller => 'news', :action => 'new', :project_id => @project},
|
{:controller => 'news', :action => 'new', :project_id => @project},
|
||||||
:class => 'icon icon-add',
|
: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>
|
||||||
|
|
||||||
<div id="add-news" style="display:none;">
|
<div id="add-news" style="display:none;">
|
||||||
|
|
|
@ -13,4 +13,5 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
|
<%= javascript_tag "Form.Element.focus('project_name');" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue