##// END OF EJS Templates
Automatically focus several form fields....
Jean-Philippe Lang -
r2293:4972084345de
parent child
Show More
@@ -4,7 +4,7
4 4 <%= link_to_if_authorized l(:label_message_new),
5 5 {:controller => 'messages', :action => 'new', :board_id => @board},
6 6 :class => 'icon icon-add',
7 :onclick => 'Element.show("add-message"); return false;' %>
7 :onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
8 8 <%= watcher_tag(@board, User.current) %>
9 9 </div>
10 10
@@ -2,7 +2,7
2 2 <%= link_to_if_authorized l(:label_document_new),
3 3 {:controller => 'documents', :action => 'new', :project_id => @project},
4 4 :class => 'icon icon-add',
5 :onclick => 'Element.show("add-document"); return false;' %>
5 :onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' %>
6 6 </div>
7 7
8 8 <div id="add-document" style="display:none;">
@@ -2,7 +2,7
2 2 <%= link_to_if_authorized(l(:label_news_new),
3 3 {:controller => 'news', :action => 'new', :project_id => @project},
4 4 :class => 'icon icon-add',
5 :onclick => 'Element.show("add-news"); return false;') if @project %>
5 :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project %>
6 6 </div>
7 7
8 8 <div id="add-news" style="display:none;">
@@ -13,4 +13,5
13 13 </fieldset>
14 14
15 15 <%= submit_tag l(:button_save) %>
16 <%= javascript_tag "Form.Element.focus('project_name');" %>
16 17 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now