From c1aedbefb045b2fc41a8747c5d88b8828efb0d6a Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 27 May 2009 07:26:21 +0000 Subject: [PATCH] Show the reply-to-comment button only when Javascript is enabled. Otherwise hide it, since the reply functions rely on jQuery. svn path=/plone.app.discussion/trunk/; revision=27142 --- .../browser/javascripts/reply_to_comment_form.js | 13 +++++++++++-- .../discussion/browser/stylesheets/discussion.css | 9 +++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) 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 76c57af..a442ea7 100644 --- a/plone/app/discussion/browser/javascripts/reply_to_comment_form.js +++ b/plone/app/discussion/browser/javascripts/reply_to_comment_form.js @@ -1,3 +1,12 @@ + jq(document).ready(function() { + /* + * Show the reply-to-comment button only when Javascript is enabled. + * Otherwise hide it, since the reply functions rely on jQuery. + */ + jq(".reply-to-comment-button").css("display" , "block") + }); + + function createReplyToCommentForm(comment_id) { /* * This function creates a form to reply to a specific comment with @@ -23,10 +32,10 @@ function createReplyToCommentForm(comment_id) { /* Fetch the reply form inside the reply div */ reply_form = reply_div.find("form"); - /* add a hidden field with the id of the comment */ + /* Add a hidden field with the id of the comment */ reply_form.append("