diff options
Diffstat (limited to 'modules/comment/js')
-rw-r--r-- | modules/comment/js/comment.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 6e985626..96370fb1 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -1,43 +1,43 @@ $("document").ready(function() { - $("#gAddCommentButton").click(function(event) { + $("#g-admin-comment-button").click(function(event) { event.preventDefault(); - if (!$("#gAddCommentForm").length) { + if (!$("#g-comment-form").length) { $.get($(this).attr("href"), {}, function(data) { - $("#gCommentDetail").append(data); + $("#g-comment-detail").append(data); ajaxify_comment_form(); }); } }); - $("#gNoComments").click(function(event) { + $("#g-no-comments").click(function(event) { event.preventDefault(); - if (!$("#gAddCommentForm").length) { + if (!$("#g-comment-form").length) { $.get($(this).attr("href"), {}, function(data) { - $("#gCommentDetail").append(data); + $("#g-comment-detail").append(data); ajaxify_comment_form(); }); - $("#gNoCommentsYet").remove(); + $("#g-no-comments-yet").remove(); } }); }); function ajaxify_comment_form() { - $("#gComments form").ajaxForm({ + $("#g-comments form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gComments form").replaceWith(data.form); + $("#g-comments form").replaceWith(data.form); ajaxify_comment_form(); } if (data.result == "success") { $.get(data.resource, function(data, textStatus) { - $("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>"); - $("#gComments .gBlockContent ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); - $("#gAddCommentForm").hide(2000).remove(); - $("#gNoCommentsYet").hide(2000); + $("#g-comments .g-block-content ul:first").append("<li>"+data+"</li>"); + $("#g-comments .g-block-content ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); + $("#g-comment-form").hide(2000).remove(); + $("#g-no-comments-yet").hide(2000); }); } } |