This commit is contained in:
albert
2013-03-10 15:06:11 -04:00
parent 92eb226c4a
commit 458c0b384a
3 changed files with 33 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
$("#forum_post_body").val($("#forum_post_body").val() + "\n\n" + <%= raw @forum_post.body.to_json %>);
var msg = <%= raw @forum_post.body.to_json %>;
if ($("#forum_post_body").val().length > 0) {
msg = $("#forum_post_body").val() + "\n\n" + msg;
}
$("#forum_post_body").val(msg);
$("#topic-response").show();
$('html, body').animate({
scrollTop: $("#forum_post_body").offset().top - 100
}, 500);
$("#forum_post_body").selectEnd();