summaryrefslogtreecommitdiff
path: root/modules/comment/js
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-10-04 00:27:22 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-10-04 00:27:22 -0600
commit3e6ba7acc3291f2268cbe9c9bef0a492b557babb (patch)
tree079c1bd09ab1cfcf35524f2e541c586a95f205e4 /modules/comment/js
parent9145331fd420ec3fe86833a7b9567ec42f1d84e8 (diff)
Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features.
Diffstat (limited to 'modules/comment/js')
-rw-r--r--modules/comment/js/comment.js26
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);
});
}
}