Fix bug when both parent and child previews are present

If the current post is displayed in both the parent and child previews,
there will be a duplicate dom id. This ensures the current-post class
gets added to both of them.
This commit is contained in:
Toks
2013-12-21 00:01:23 -05:00
parent d0c0d2a314
commit 6be6ac8c41

View File

@@ -247,7 +247,7 @@
Danbooru.Post.initialize_post_relationship_previews = function() {
var current_post_id = $("meta[name=post-id]").attr("content");
$("#post_" + current_post_id).addClass("current-post");
$("[id=post_" + current_post_id + "]").addClass("current-post");
if (Danbooru.Cookie.get("show-relationship-previews") === "0") {
this.toggle_relationship_preview($("#has-children-relationship-preview"), $("#has-children-relationship-preview-link"));