diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-19 11:17:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-19 11:17:42 +0000 |
commit | c586449eb33d35507d6417e970a222903a2b927a (patch) | |
tree | fa0574831dc831b2f2dd9696e063013a0dc7ced4 /app/views/journals | |
parent | 7b3f2b51c0ea735a4723fae24eff9bfbca254d8a (diff) | |
download | redmine-c586449eb33d35507d6417e970a222903a2b927a.tar.gz redmine-c586449eb33d35507d6417e970a222903a2b927a.zip |
Don't replace the already entered comment when quoting a previous comment.
git-svn-id: http://svn.redmine.org/redmine/trunk@15990 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/journals')
-rw-r--r-- | app/views/journals/new.js.erb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/views/journals/new.js.erb b/app/views/journals/new.js.erb index cd6ab0d35..0f832f37f 100644 --- a/app/views/journals/new.js.erb +++ b/app/views/journals/new.js.erb @@ -1,4 +1,9 @@ -$('#issue_notes').val("<%= raw escape_javascript(@content) %>"); +showAndScrollTo("update"); + +var notes = $('#issue_notes').val(); +if (notes > "") { notes = notes + "\n\n"} + +$('#issue_notes').blur().focus().val(notes + "<%= raw escape_javascript(@content) %>"); <% # when quoting a private journal, check the private checkbox if @journal && @journal.private_notes? @@ -6,5 +11,3 @@ $('#issue_notes').val("<%= raw escape_javascript(@content) %>"); $('#issue_private_notes').prop('checked', true); <% end %> -showAndScrollTo("update", "notes"); -$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight; |