summaryrefslogtreecommitdiff
path: root/modules/comment/js/comment.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-22 07:59:26 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-22 07:59:26 -0700
commitb310fab1f8e88371e4f2f1fa41173e1fc5eddb60 (patch)
tree120fdd8a15b965326adb6c36e5425117485746d5 /modules/comment/js/comment.js
parent78cce555c377b4dd3078a007c6c407cf4eb9f6dd (diff)
Change the link on the "Be first to comment" link to do a request to the server to get the comment add form. Fixes ticket #699.
Diffstat (limited to 'modules/comment/js/comment.js')
-rw-r--r--modules/comment/js/comment.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js
index bff83770..6e985626 100644
--- a/modules/comment/js/comment.js
+++ b/modules/comment/js/comment.js
@@ -10,6 +10,18 @@ $("document").ready(function() {
});
}
});
+ $("#gNoComments").click(function(event) {
+ event.preventDefault();
+ if (!$("#gAddCommentForm").length) {
+ $.get($(this).attr("href"),
+ {},
+ function(data) {
+ $("#gCommentDetail").append(data);
+ ajaxify_comment_form();
+ });
+ $("#gNoCommentsYet").remove();
+ }
+ });
});
function ajaxify_comment_form() {