@@ -94,10 +94,11 class MessagesController < ApplicationController | |||||
94 | user = @message.author |
|
94 | user = @message.author | |
95 | text = @message.content |
|
95 | text = @message.content | |
96 | subject = @message.subject.gsub('"', '\"') |
|
96 | subject = @message.subject.gsub('"', '\"') | |
|
97 | subject = "RE: #{subject}" unless subject.starts_with?('RE:') | |||
97 | content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " |
|
98 | content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " | |
98 | content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n" |
|
99 | content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n" | |
99 | render(:update) { |page| |
|
100 | render(:update) { |page| | |
100 |
page << "$('reply_subject').value = \" |
|
101 | page << "$('reply_subject').value = \"#{subject}\";" | |
101 | page.<< "$('message_content').value = \"#{content}\";" |
|
102 | page.<< "$('message_content').value = \"#{content}\";" | |
102 | page.show 'reply' |
|
103 | page.show 'reply' | |
103 | page << "Form.Element.focus('message_content');" |
|
104 | page << "Form.Element.focus('message_content');" |
General Comments 0
You need to be logged in to leave comments.
Login now