Fixed: clicking journal edit multiple times shows multiple forms (#12568).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10991 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-13 12:42:10 +00:00
parent c99b638d61
commit b99a6f11f3
1 changed files with 7 additions and 1 deletions

View File

@ -1,2 +1,8 @@
$("#journal-<%= @journal.id %>-notes").hide();
if ($("form#journal-<%= @journal.id %>-form").length > 0) {
// journal edit form already loaded
$("#journal-<%= @journal.id %>-form").show();
} else {
$("#journal-<%= @journal.id %>-notes").after('<%= escape_javascript(render :partial => 'notes_form') %>');
}