add post status borders to listing

This commit is contained in:
albert
2011-10-22 13:04:37 -04:00
parent 73a8c19c6e
commit b28817c5e5
3 changed files with 38 additions and 1 deletions

View File

@@ -29,6 +29,23 @@
Danbooru.Post.initialize_title_for = function(post) {
var $post = $(post);
$post.attr("title", $post.data("tags") + " uploader:" + $post.data("uploader") + " rating:" + $post.data("rating"));
var status = $post.data("flags");
if (status.match(/pending/)) {
$post.addClass("post-status-pending");
}
if (status.match(/flagged/)) {
$post.addClass("post-status-flagged");
}
if ($post.data("parent-id")) {
$post.addClass("post-status-has-parent");
}
if ($post.data("has-children")) {
$post.addClass("post-status-has-children");
}
}
Danbooru.Post.initialize_image_resize = function() {

View File

@@ -28,6 +28,26 @@ article.post-preview.blacklisted-active {
display: none;
}
article.post-preview {
border: 3px solid white;
}
article.post-preview.post-status-has-parent {
border: 3px solid #CC0;
}
article.post-preview.post-status-has-children {
border: 3px solid #0F0;
}
article.post-preview.post-status-pending {
border: 3px solid #00F;
}
article.post-preview.post-status-flagged {
border: 3px solid #F00;
}
div#c-posts {
li.category-1 a {
color: #A00;