<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %>
-
- <%= javascript_tag "$('#issue_subject').focus();" %>
<% end %>
<div id="preview" class="wiki"></div>
<%= render :partial => 'sidebar' %>
<% end %>
<% end %>
-
-<%= javascript_tag "$('#password').focus();" %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
-<%= javascript_tag "$('#project_name').focus();" %>
<% end %>
<%= form_tag({}, :method => :get, :id => 'search-form') do %>
<%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
-<%= javascript_tag "$('#search-input').focus()" %>
<%= project_select_tag %>
<%= hidden_field_tag 'all_words', '', :id => nil %>
<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
});
}
+function defaultFocus(){
+ if ($('#content :focus').length == 0) {
+ $('#content input[type=text], #content textarea').first().focus();
+ }
+}
+
function blockEventPropagation(event) {
event.stopPropagation();
event.preventDefault();
$(document).ready(setupAjaxIndicator);
$(document).ready(hideOnLoad);
$(document).ready(addFormObserversForDoubleSubmit);
+$(document).ready(defaultFocus);