From 12ee7d6a5abe7b608f386cf21bd0ba08800cf0aa Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 4 Aug 2009 15:19:20 +0000 Subject: [PATCH] show/hide the comment/reply button inside the comment/reply-to-comment forms. svn path=/plone.app.discussion/trunk/; revision=28352 --- plone/app/discussion/browser/javascripts/comments.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index da4b153..8b60931 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -1,5 +1,7 @@ jq(document).ready(function() { + jq(".reply").find("input[name='form.buttons.reply']").css("display", "none"); + /***************************************************************** * Show the reply button only when Javascript is enabled. * Otherwise hide it, since the reply functions relies on jQuery. @@ -47,8 +49,10 @@ jq(document).ready(function() { var cancel_reply_button = reply_div.find(".cancelreplytocomment"); cancel_reply_button.attr("id", comment_id); - /* Hide the comment button */ - reply_form.find("input[name='form.buttons.comment'").css("background", "red"); + /* Hide the comment button and show the reply button + * in the reply-to-comment forms */ + reply_form.find("input[name='form.buttons.comment']").css("display", "none"); + reply_form.find("input[name='form.buttons.reply']").css("display", "inline"); /* Show the reply layer with a slide down effect */ reply_div.slideDown("slow");