summaryrefslogtreecommitdiff
path: root/modules/comment/js/comment.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-28 13:44:01 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-28 13:44:01 -0700
commit1d5262f9c354a8564f05a8a31b915ad479f4d361 (patch)
treeb8a57186de654a908b89ee8e7a1a031c0851c819 /modules/comment/js/comment.js
parentdcead39dfbd1885720e888446d0572e11b7ad47c (diff)
Fix ticket #591: reCaptcha always on the page.
1) move creating the "Add a comment" button into the comments.html.php 2) use $.get() to retrieve the comment add form
Diffstat (limited to 'modules/comment/js/comment.js')
-rw-r--r--modules/comment/js/comment.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js
index 00fc6027..9fd63c1a 100644
--- a/modules/comment/js/comment.js
+++ b/modules/comment/js/comment.js
@@ -1,5 +1,13 @@
$("document").ready(function() {
- ajaxify_comment_form();
+ $("#gAddCommentButton").click(function(event) {
+ event.preventDefault();
+ $.get($(this).attr("href"),
+ {},
+ function(data) {
+ $("#gCommentDetail").append(data);
+ ajaxify_comment_form();
+ });
+ });
});
function ajaxify_comment_form() {