From 416d33973fdf253d96c6f2090c6bb1fc3e9c0bd8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 15 Dec 2012 07:55:50 +0000 Subject: [PATCH] Merged r10991 from trunk (#12568). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.2-stable@11009 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/journals/edit.js.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/journals/edit.js.erb b/app/views/journals/edit.js.erb index 73b8082a4..96cf6b4f8 100644 --- a/app/views/journals/edit.js.erb +++ b/app/views/journals/edit.js.erb @@ -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') %>'); +} -- 2.39.5