Skip to content

Commit

Permalink
Fixed: clicking journal edit multiple times shows multiple forms (#12…
Browse files Browse the repository at this point in the history
…568).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10991 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
jplang committed Dec 13, 2012
1 parent c99b638 commit b99a6f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/views/journals/edit.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
$("#journal-<%= @journal.id %>-notes").hide();
$("#journal-<%= @journal.id %>-notes").after('<%= escape_javascript(render :partial => 'notes_form') %>');

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') %>');
}

0 comments on commit b99a6f1

Please sign in to comment.