diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-19 18:23:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-19 18:23:45 +0000 |
commit | e8469e2c5b41e59a1a204ac730e2c3ab9261b8ff (patch) | |
tree | 3b8963c3fb5c9190b25dbef4babe7c962900054e /app/controllers/messages_controller.rb | |
parent | 3386008491aff7d8a3e10d4d7fa84108ce5a8a38 (diff) | |
download | redmine-e8469e2c5b41e59a1a204ac730e2c3ab9261b8ff.tar.gz redmine-e8469e2c5b41e59a1a204ac730e2c3ab9261b8ff.zip |
Removes RJS from MessagesController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10053 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/messages_controller.rb')
-rw-r--r-- | app/controllers/messages_controller.rb | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index cc53c0d78..6b154a81c 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -105,20 +105,11 @@ class MessagesController < ApplicationController end def quote - user = @message.author - text = @message.content - subject = @message.subject.gsub('"', '\"') - subject = "RE: #{subject}" unless subject.starts_with?('RE:') - content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " - content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n" - render(:update) { |page| - page << "$('message_subject').value = \"#{subject}\";" - page.<< "$('message_content').value = \"#{content}\";" - page.show 'reply' - page << "Form.Element.focus('message_content');" - page << "Element.scrollTo('reply');" - page << "$('message_content').scrollTop = $('message_content').scrollHeight - $('message_content').clientHeight;" - } + @subject = @message.subject + @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') + + @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " + @content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" end def preview |