Fix forwardlinks when previewing from an inlined post.

This commit is contained in:
Nicolas Stepien 2012-05-16 14:53:33 +02:00
parent e32148fc5f
commit 075568e4d7
2 changed files with 2 additions and 2 deletions

View File

@ -3203,7 +3203,7 @@
$.addClass(el, 'qphl'); $.addClass(el, 'qphl');
} }
} }
replyID = $.x('ancestor::div[contains(@class,"postContainer")]', this).id.slice(2); replyID = $.x('ancestor::div[contains(@class,"postContainer")]', this).id.match(/\d+$/)[0];
_ref = $$('.quotelink, .backlink', qp); _ref = $$('.quotelink, .backlink', qp);
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
quote = _ref[_i]; quote = _ref[_i];

View File

@ -2431,7 +2431,7 @@ QuotePreview =
$.addClass el.parentNode, 'qphl' $.addClass el.parentNode, 'qphl'
else else
$.addClass el, 'qphl' $.addClass el, 'qphl'
replyID = $.x('ancestor::div[contains(@class,"postContainer")]', @).id[2..] replyID = $.x('ancestor::div[contains(@class,"postContainer")]', @).id.match(/\d+$/)[0]
for quote in $$ '.quotelink, .backlink', qp for quote in $$ '.quotelink, .backlink', qp
if quote.hash[2..] is replyID if quote.hash[2..] is replyID
$.addClass quote, 'forwardlink' $.addClass quote, 'forwardlink'