change fix for #1570
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
Danbooru.Post.pending_update_count = 0;
|
Danbooru.Post.pending_update_count = 0;
|
||||||
|
|
||||||
Danbooru.Post.initialize_all = function() {
|
Danbooru.Post.initialize_all = function() {
|
||||||
|
this.initialize_post_previews();
|
||||||
|
|
||||||
if ($("#c-posts").length) {
|
if ($("#c-posts").length) {
|
||||||
if (Danbooru.meta("enable-js-navigation") === "true") {
|
if (Danbooru.meta("enable-js-navigation") === "true") {
|
||||||
this.initialize_shortcuts();
|
this.initialize_shortcuts();
|
||||||
@@ -27,8 +29,6 @@
|
|||||||
$("#image-resize-to-window-link").click();
|
$("#image-resize-to-window-link").click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initialize_post_previews();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Post.initialize_similar = function() {
|
Danbooru.Post.initialize_similar = function() {
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
Danbooru.Post.initialize_post_relationship_previews = function() {
|
Danbooru.Post.initialize_post_relationship_previews = function() {
|
||||||
var current_post_id = $("meta[name=post-id]").attr("content");
|
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") {
|
if (Danbooru.Cookie.get("show-relationship-previews") === "0") {
|
||||||
this.toggle_relationship_preview($("#has-children-relationship-preview"), $("#has-children-relationship-preview-link"));
|
this.toggle_relationship_preview($("#has-children-relationship-preview"), $("#has-children-relationship-preview-link"));
|
||||||
@@ -218,9 +218,6 @@
|
|||||||
} else if ($post.hasClass("post-status-flagged")) {
|
} else if ($post.hasClass("post-status-flagged")) {
|
||||||
border_colors.push("#F00");
|
border_colors.push("#F00");
|
||||||
}
|
}
|
||||||
if ($post.hasClass("post-status-current")) {
|
|
||||||
border_colors.push("#F80");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (border_colors.length > 1) {
|
if (border_colors.length > 1) {
|
||||||
$img.css("border", "2px solid");
|
$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]);
|
$img.css("border-color", border_colors[0] + " " + border_colors[1] + " " + border_colors[1] + " " + border_colors[0]);
|
||||||
} else if (border_colors.length === 3) {
|
} else if (border_colors.length === 3) {
|
||||||
$img.css("border-color", border_colors[0] + " " + border_colors[2] + " " + border_colors[2] + " " + border_colors[1]);
|
$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]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,15 +46,22 @@ a.blacklisted-active {
|
|||||||
border: 2px solid #F00;
|
border: 2px solid #F00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-preview.current-post {
|
||||||
|
background-color: rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
#has-parent-relationship-preview, #has-children-relationship-preview {
|
#has-parent-relationship-preview, #has-children-relationship-preview {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
margin-top: 5px;
|
||||||
|
|
||||||
#has-parent-relationship-preview article.post-preview, #has-children-relationship-preview article.post-preview {
|
article.post-preview {
|
||||||
float: none;
|
float: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
border: none;
|
border: none;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0 5px 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-1 a, a.tag-type-1 {
|
.category-1 a, a.tag-type-1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user