Fix quote features in expanded comments. close #195

This commit is contained in:
Nicolas Stepien 2011-08-26 08:50:31 +02:00
parent cd99d4bd7c
commit df62a45451
2 changed files with 25 additions and 1 deletions

View File

@ -543,7 +543,7 @@
}));
},
parse: function(req, a, threadID, replyID) {
var body, bq, reply, _i, _len, _ref;
var body, bq, quote, reply, _i, _j, _len, _len2, _ref, _ref2;
if (req.status !== 200) {
a.textContent = "" + req.status + " " + req.statusText;
return;
@ -563,6 +563,21 @@
}
}
}
_ref2 = $$('a.quotelink', bq);
for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
quote = _ref2[_j];
if (quote.getAttribute('href') === quote.hash) {
quote.pathname = "/" + g.BOARD + "/res/" + threadID;
}
if (conf['Quote Preview']) {
$.bind(quote, 'mouseover', quotePreview.mouseover);
$.bind(quote, 'mousemove', ui.hover);
$.bind(quote, 'mouseout', quotePreview.mouseout);
}
if (conf['Quote Inline']) {
$.bind(quote, 'click', quoteInline.toggle);
}
}
return $.replace(a.parentNode.parentNode, bq);
}
};

View File

@ -401,6 +401,15 @@ expandComment =
if reply.id == replyID
bq = $ 'blockquote', reply
break
for quote in $$ 'a.quotelink', bq
if quote.getAttribute('href') is quote.hash
quote.pathname = "/#{g.BOARD}/res/#{threadID}"
if conf['Quote Preview']
$.bind quote, 'mouseover', quotePreview.mouseover
$.bind quote, 'mousemove', ui.hover
$.bind quote, 'mouseout', quotePreview.mouseout
if conf['Quote Inline']
$.bind quote, 'click', quoteInline.toggle
$.replace a.parentNode.parentNode, bq
expandThread =