From: Jean-Philippe Lang Date: Sat, 15 Mar 2014 11:21:16 +0000 (+0000) Subject: Select proper tracker and status for when hitting F5 with browsers that preserve... X-Git-Tag: 2.6.0~276 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=218e5f40a15932206cf243e83fbdcfad5cc38cd6;p=redmine.git Select proper tracker and status for when hitting F5 with browsers that preserve select values on reload, eg. Firefox (#16259). git-svn-id: http://svn.redmine.org/redmine/trunk@12970 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index e968963d2..401789c13 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -45,3 +45,11 @@ <% end %> <% heads_for_wiki_formatter %> + +<%= javascript_tag do %> +$(document).ready(function(){ + $("#issue_tracker_id, #issue_status_id").each(function(){ + $(this).val($(this).find("option[selected=selected]").val()); + }); +}); +<% end %>