change fix for #1570

This commit is contained in:
Toks
2013-05-10 18:32:24 -04:00
parent eaf016921d
commit c0d90e84a8
2 changed files with 16 additions and 14 deletions

View File

@@ -4,6 +4,8 @@
Danbooru.Post.pending_update_count = 0;
Danbooru.Post.initialize_all = function() {
this.initialize_post_previews();
if ($("#c-posts").length) {
if (Danbooru.meta("enable-js-navigation") === "true") {
this.initialize_shortcuts();
@@ -27,8 +29,6 @@
$("#image-resize-to-window-link").click();
}
}
this.initialize_post_previews();
}
Danbooru.Post.initialize_similar = function() {
@@ -137,7 +137,7 @@
Danbooru.Post.initialize_post_relationship_previews = function() {
var current_post_id = $("meta[name=post-id]").attr("content");
$("#post_" + current_post_id).addClass("post-status-current");
$("#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"));
@@ -218,9 +218,6 @@
} else if ($post.hasClass("post-status-flagged")) {
border_colors.push("#F00");
}
if ($post.hasClass("post-status-current")) {
border_colors.push("#F80");
}
if (border_colors.length > 1) {
$img.css("border", "2px solid");
@@ -228,8 +225,6 @@
$img.css("border-color", border_colors[0] + " " + border_colors[1] + " " + border_colors[1] + " " + border_colors[0]);
} else if (border_colors.length === 3) {
$img.css("border-color", border_colors[0] + " " + border_colors[2] + " " + border_colors[2] + " " + border_colors[1]);
} else if (border_colors.length === 4) {
$img.css("border-color", border_colors[0] + " " + border_colors[2] + " " + border_colors[3] + " " + border_colors[1]);
}
}
}

View File

@@ -46,15 +46,22 @@ a.blacklisted-active {
border: 2px solid #F00;
}
.post-preview.current-post {
background-color: rgba(0,0,0,0.1);
}
#has-parent-relationship-preview, #has-children-relationship-preview {
overflow-x: auto;
white-space: nowrap;
}
#has-parent-relationship-preview article.post-preview, #has-children-relationship-preview article.post-preview {
float: none;
width: auto;
border: none;
margin-top: 5px;
article.post-preview {
float: none;
width: auto;
border: none;
margin: 0px;
padding: 0 5px 10px;
}
}
.category-1 a, a.tag-type-1 {