Fix filter highlight styling.

This commit is contained in:
Nicolas Stepien 2012-04-30 10:28:44 +02:00
parent e52ee68c97
commit 18c9642b52
2 changed files with 8 additions and 15 deletions

View File

@ -621,7 +621,7 @@
if (post.isInlined) { if (post.isInlined) {
return; return;
} }
isOP = post["class"] === 'op'; isOP = /\bop\b/.test(post["class"]);
el = post.el; el = post.el;
for (key in Filter.filters) { for (key in Filter.filters) {
value = Filter[key](post); value = Filter[key](post);
@ -646,11 +646,7 @@
} }
return; return;
} }
if (isOP) { $.addClass((isOP ? post.root.parentNode : post.root), result[0]);
$.addClass(el.parentNode, result[0]);
} else {
$.addClass(el, result[0]);
}
if (isOP && result[1] && !g.REPLY) { if (isOP && result[1] && !g.REPLY) {
thisThread = el.parentNode.parentNode; thisThread = el.parentNode.parentNode;
if (firstThread = $('div[class="postContainer opContainer"]')) { if (firstThread = $('div[class="postContainer opContainer"]')) {
@ -4574,8 +4570,8 @@ input ~ a > img[data-md5] {\
.filetitle, .replytitle, .postername, .commentpostername, .postertrip {\ .filetitle, .replytitle, .postername, .commentpostername, .postertrip {\
background: none;\ background: none;\
}\ }\
.filter_highlight.op,\ .filter_highlight.thread,\
.filter_highlight > td[id] {\ .filter_highlight > .reply {\
box-shadow: -5px 0 rgba(255,0,0,0.5);\ box-shadow: -5px 0 rgba(255,0,0,0.5);\
}\ }\
.filtered {\ .filtered {\

View File

@ -513,7 +513,7 @@ Filter =
node: (post) -> node: (post) ->
return if post.isInlined return if post.isInlined
isOP = post.class is 'op' isOP = /\bop\b/.test post.class
{el} = post {el} = post
for key of Filter.filters for key of Filter.filters
value = Filter[key] post value = Filter[key] post
@ -536,10 +536,7 @@ Filter =
return return
# Highlight # Highlight
if isOP $.addClass (if isOP then post.root.parentNode else post.root), result[0]
$.addClass el.parentNode, result[0]
else
$.addClass el, result[0]
if isOP and result[1] and not g.REPLY if isOP and result[1] and not g.REPLY
# Put the highlighted OPs' threads on top of the board pages... # Put the highlighted OPs' threads on top of the board pages...
thisThread = el.parentNode.parentNode thisThread = el.parentNode.parentNode
@ -3595,8 +3592,8 @@ input ~ a > img[data-md5] {
.filetitle, .replytitle, .postername, .commentpostername, .postertrip { .filetitle, .replytitle, .postername, .commentpostername, .postertrip {
background: none; background: none;
} }
.filter_highlight.op, .filter_highlight.thread,
.filter_highlight > td[id] { .filter_highlight > .reply {
box-shadow: -5px 0 rgba(255,0,0,0.5); box-shadow: -5px 0 rgba(255,0,0,0.5);
} }
.filtered { .filtered {