@@ -44,8 +44,6 | |||
|
44 | 44 | <%= submit_tag l(:button_create) %> |
|
45 | 45 | <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
|
46 | 46 | <%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %> |
|
47 | ||
|
48 | <%= javascript_tag "$('#issue_subject').focus();" %> | |
|
49 | 47 | <% end %> |
|
50 | 48 | |
|
51 | 49 | <div id="preview" class="wiki"></div> |
@@ -22,5 +22,3 | |||
|
22 | 22 | <%= render :partial => 'sidebar' %> |
|
23 | 23 | <% end %> |
|
24 | 24 | <% end %> |
|
25 | ||
|
26 | <%= javascript_tag "$('#password').focus();" %> |
@@ -4,5 +4,4 | |||
|
4 | 4 | <%= render :partial => 'form', :locals => { :f => f } %> |
|
5 | 5 | <%= submit_tag l(:button_create) %> |
|
6 | 6 | <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
|
7 | <%= javascript_tag "$('#project_name').focus();" %> | |
|
8 | 7 | <% end %> |
@@ -4,7 +4,6 | |||
|
4 | 4 | <%= form_tag({}, :method => :get, :id => 'search-form') do %> |
|
5 | 5 | <%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %> |
|
6 | 6 | <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %> |
|
7 | <%= javascript_tag "$('#search-input').focus()" %> | |
|
8 | 7 | <%= project_select_tag %> |
|
9 | 8 | <%= hidden_field_tag 'all_words', '', :id => nil %> |
|
10 | 9 | <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label> |
@@ -583,6 +583,12 function addFormObserversForDoubleSubmit() { | |||
|
583 | 583 | }); |
|
584 | 584 | } |
|
585 | 585 | |
|
586 | function defaultFocus(){ | |
|
587 | if ($('#content :focus').length == 0) { | |
|
588 | $('#content input[type=text], #content textarea').first().focus(); | |
|
589 | } | |
|
590 | } | |
|
591 | ||
|
586 | 592 | function blockEventPropagation(event) { |
|
587 | 593 | event.stopPropagation(); |
|
588 | 594 | event.preventDefault(); |
@@ -604,4 +610,5 $(document).ready(function(){ | |||
|
604 | 610 | $(document).ready(setupAjaxIndicator); |
|
605 | 611 | $(document).ready(hideOnLoad); |
|
606 | 612 | $(document).ready(addFormObserversForDoubleSubmit); |
|
613 | $(document).ready(defaultFocus); | |
|
607 | 614 |
General Comments 0
You need to be logged in to leave comments.
Login now