fixes #1424 for comments

This commit is contained in:
Toks
2013-06-14 12:23:10 -04:00
parent 5fa931f148
commit 739da4c4b9
3 changed files with 20 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
this.initialize_response_link();
this.initialize_reply_links();
this.initialize_expand_links();
this.initialize_edit_links();
}
if ($("#c-posts").length && $("#a-show").length) {
@@ -63,6 +64,16 @@
$("div.new-comment form").hide();
}
Danbooru.Comment.initialize_edit_links = function() {
$(".edit_comment").hide();
$(".edit_comment_link").click(function(e) {
var link_id = $(this).attr("id");
var comment_id = link_id.match(/^edit_comment_link_(\d+)$/)[1];
$("#edit_comment_" + comment_id).toggle();
e.preventDefault();
});
}
Danbooru.Comment.highlight_threshold_comments = function(post_id) {
var threshold = parseInt(Danbooru.meta("user-comment-threshold"));
var articles = $("article.comment[data-post-id=" + post_id + "]");