show/hide the comment/reply button inside the comment/reply-to-comment forms.

svn path=/plone.app.discussion/trunk/; revision=28352
This commit is contained in:
Timo Stollenwerk 2009-08-04 15:19:20 +00:00
parent c516d6ba55
commit 12ee7d6a5a

View File

@ -1,5 +1,7 @@
jq(document).ready(function() { jq(document).ready(function() {
jq(".reply").find("input[name='form.buttons.reply']").css("display", "none");
/***************************************************************** /*****************************************************************
* Show the reply button only when Javascript is enabled. * Show the reply button only when Javascript is enabled.
* Otherwise hide it, since the reply functions relies on jQuery. * 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"); var cancel_reply_button = reply_div.find(".cancelreplytocomment");
cancel_reply_button.attr("id", comment_id); cancel_reply_button.attr("id", comment_id);
/* Hide the comment button */ /* Hide the comment button and show the reply button
reply_form.find("input[name='form.buttons.comment'").css("background", "red"); * 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 */ /* Show the reply layer with a slide down effect */
reply_div.slideDown("slow"); reply_div.slideDown("slow");