Ugh. Fix OP Quote Highlighting.
This commit is contained in:
parent
070816de06
commit
1d517d6bec
@ -3123,7 +3123,11 @@
|
|||||||
var clonePost, el, i, inline, pathname, root;
|
var clonePost, el, i, inline, pathname, root;
|
||||||
root = $.x('ancestor::*[parent::blockquote]', q);
|
root = $.x('ancestor::*[parent::blockquote]', q);
|
||||||
if (el = $.id("p" + id)) {
|
if (el = $.id("p" + id)) {
|
||||||
$.removeClass(el, 'qphl');
|
if (/\bop\b/.test(el.className)) {
|
||||||
|
$.removeClass(el.parentNode, 'qphl');
|
||||||
|
} else {
|
||||||
|
$.removeClass(el, 'qphl');
|
||||||
|
}
|
||||||
clonePost = QuoteInline.clone(id, el);
|
clonePost = QuoteInline.clone(id, el);
|
||||||
if (/\bbacklink\b/.test(q.className)) {
|
if (/\bbacklink\b/.test(q.className)) {
|
||||||
$.after(q.parentNode, clonePost);
|
$.after(q.parentNode, clonePost);
|
||||||
@ -3250,7 +3254,11 @@
|
|||||||
if (el = $.id("p" + id)) {
|
if (el = $.id("p" + id)) {
|
||||||
qp.innerHTML = el.innerHTML;
|
qp.innerHTML = el.innerHTML;
|
||||||
if (Conf['Quote Highlighting']) {
|
if (Conf['Quote Highlighting']) {
|
||||||
$.addClass(el, 'qphl');
|
if (/\bop\b/.test(el.className)) {
|
||||||
|
$.addClass(el.parentNode, 'qphl');
|
||||||
|
} else {
|
||||||
|
$.addClass(el, 'qphl');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
replyID = $.x('ancestor::div[contains(@class,"postContainer")]', this).id.slice(2);
|
replyID = $.x('ancestor::div[contains(@class,"postContainer")]', this).id.slice(2);
|
||||||
_ref = $$('.quotelink, .backlink', qp);
|
_ref = $$('.quotelink, .backlink', qp);
|
||||||
@ -3274,7 +3282,11 @@
|
|||||||
var el;
|
var el;
|
||||||
UI.hoverend();
|
UI.hoverend();
|
||||||
if (el = $.id(this.hash.slice(1))) {
|
if (el = $.id(this.hash.slice(1))) {
|
||||||
$.removeClass(el, 'qphl');
|
if (/\bop\b/.test(el.className)) {
|
||||||
|
$.removeClass(el.parentNode, 'qphl');
|
||||||
|
} else {
|
||||||
|
$.removeClass(el, 'qphl');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$.off(this, 'mousemove', UI.hover);
|
$.off(this, 'mousemove', UI.hover);
|
||||||
return $.off(this, 'mouseout click', QuotePreview.mouseout);
|
return $.off(this, 'mouseout click', QuotePreview.mouseout);
|
||||||
@ -4538,6 +4550,12 @@ textarea.field {\
|
|||||||
.qphl {\
|
.qphl {\
|
||||||
outline: 2px solid rgba(216, 94, 49, .7);\
|
outline: 2px solid rgba(216, 94, 49, .7);\
|
||||||
}\
|
}\
|
||||||
|
.qphl.opContainer {\
|
||||||
|
outline-offset: -2px;\
|
||||||
|
}\
|
||||||
|
div.opContainer {\
|
||||||
|
display: block !important;\
|
||||||
|
}\
|
||||||
.inlined {\
|
.inlined {\
|
||||||
opacity: .5;\
|
opacity: .5;\
|
||||||
}\
|
}\
|
||||||
|
|||||||
@ -2406,7 +2406,10 @@ QuoteInline =
|
|||||||
add: (q, id) ->
|
add: (q, id) ->
|
||||||
root = $.x 'ancestor::*[parent::blockquote]', q
|
root = $.x 'ancestor::*[parent::blockquote]', q
|
||||||
if el = $.id "p#{id}"
|
if el = $.id "p#{id}"
|
||||||
$.removeClass el, 'qphl'
|
if /\bop\b/.test el.className
|
||||||
|
$.removeClass el.parentNode, 'qphl'
|
||||||
|
else
|
||||||
|
$.removeClass el, 'qphl'
|
||||||
clonePost = QuoteInline.clone id, el
|
clonePost = QuoteInline.clone id, el
|
||||||
if /\bbacklink\b/.test q.className
|
if /\bbacklink\b/.test q.className
|
||||||
$.after q.parentNode, clonePost
|
$.after q.parentNode, clonePost
|
||||||
@ -2492,7 +2495,11 @@ QuotePreview =
|
|||||||
id = @hash[2..]
|
id = @hash[2..]
|
||||||
if el = $.id "p#{id}"
|
if el = $.id "p#{id}"
|
||||||
qp.innerHTML = el.innerHTML
|
qp.innerHTML = el.innerHTML
|
||||||
$.addClass el, 'qphl' if Conf['Quote Highlighting']
|
if Conf['Quote Highlighting']
|
||||||
|
if /\bop\b/.test el.className
|
||||||
|
$.addClass el.parentNode, 'qphl'
|
||||||
|
else
|
||||||
|
$.addClass el, 'qphl'
|
||||||
replyID = $.x('ancestor::div[contains(@class,"postContainer")]', @).id[2..]
|
replyID = $.x('ancestor::div[contains(@class,"postContainer")]', @).id[2..]
|
||||||
for quote in $$ '.quotelink, .backlink', qp
|
for quote in $$ '.quotelink, .backlink', qp
|
||||||
if quote.hash[2..] is replyID
|
if quote.hash[2..] is replyID
|
||||||
@ -2506,7 +2513,10 @@ QuotePreview =
|
|||||||
mouseout: ->
|
mouseout: ->
|
||||||
UI.hoverend()
|
UI.hoverend()
|
||||||
if el = $.id @hash[1..]
|
if el = $.id @hash[1..]
|
||||||
$.removeClass el, 'qphl'
|
if /\bop\b/.test el.className
|
||||||
|
$.removeClass el.parentNode, 'qphl'
|
||||||
|
else
|
||||||
|
$.removeClass el, 'qphl'
|
||||||
$.off @, 'mousemove', UI.hover
|
$.off @, 'mousemove', UI.hover
|
||||||
$.off @, 'mouseout click', QuotePreview.mouseout
|
$.off @, 'mouseout click', QuotePreview.mouseout
|
||||||
parse: (req, id) ->
|
parse: (req, id) ->
|
||||||
@ -3555,6 +3565,12 @@ textarea.field {
|
|||||||
.qphl {
|
.qphl {
|
||||||
outline: 2px solid rgba(216, 94, 49, .7);
|
outline: 2px solid rgba(216, 94, 49, .7);
|
||||||
}
|
}
|
||||||
|
.qphl.opContainer {
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
div.opContainer {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
.inlined {
|
.inlined {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user