From adb3a6d9bef13b4d51b9a654e54b2f22b745e63d Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 16 Jun 2009 23:04:54 +0000 Subject: [PATCH] remove typed in text after copying the reply form. svn path=/plone.app.discussion/trunk/; revision=27472 --- .../browser/javascripts/reply_to_comment_form.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plone/app/discussion/browser/javascripts/reply_to_comment_form.js b/plone/app/discussion/browser/javascripts/reply_to_comment_form.js index 5703f6b..c4a0ca2 100644 --- a/plone/app/discussion/browser/javascripts/reply_to_comment_form.js +++ b/plone/app/discussion/browser/javascripts/reply_to_comment_form.js @@ -21,7 +21,6 @@ function createReplyToCommentForm(comment_id) { */ reply_div = jq("#commenting").clone(true); reply_div.insertAfter(button).css("display", "none") - reply_div.slideDown("slow"); /* Remove id="reply" attribute, since we use it to uniquely the main reply form. */ @@ -47,6 +46,13 @@ function createReplyToCommentForm(comment_id) { cancel_reply_button = reply_div.find(".cancelreplytocomment"); cancel_reply_button.attr("onclick", "removeReplyToCommentForm(" + comment_id +");") + /* Remove already typed in text from the reply form. */ + reply_form.find(".field").find("input").attr("value", "") + reply_form.find(".field").find("textarea").attr("value", "") + + /* Show the reply layer with a slide down effect */ + reply_div.slideDown("slow"); + /* Show the cancel button in the reply-to-comment form */ cancel_reply_button.css("display", "inline") }