identify backlinker quotes in qp

This commit is contained in:
James Campos 2011-05-21 23:48:56 -07:00
parent da647236c0
commit 3c1ca5c302
2 changed files with 16 additions and 1 deletions

View File

@ -1846,7 +1846,7 @@
return $.removeClass(d.getElementById(this.hash.slice(1)), 'qphl');
},
mouseover: function(e) {
var el, id, qp, req, threadID;
var el, id, qp, quote, replyID, req, threadID, _i, _len, _ref;
if (!(id = this.hash.slice(1))) {
return;
}
@ -1854,6 +1854,16 @@
if (el = d.getElementById(id)) {
qp.innerHTML = el.innerHTML;
$.addClass(el, 'qphl');
if (this.className === 'backlink') {
replyID = this.parentNode.id;
_ref = $$('a.quotelink', qp);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
quote = _ref[_i];
if (quote.hash.slice(1) === replyID) {
quote.className = 'backlink';
}
}
}
} else {
qp.innerHTML = "Loading " + id + "...";
threadID = this.pathname.split('/').pop();

View File

@ -1472,6 +1472,11 @@ quotePreview =
if el = d.getElementById id
qp.innerHTML = el.innerHTML
$.addClass el, 'qphl'
if @className is 'backlink'
replyID = @parentNode.id
for quote in $$ 'a.quotelink', qp
if quote.hash[1..] is replyID
quote.className = 'backlink'
else
qp.innerHTML = "Loading #{id}..."
threadID = @pathname.split('/').pop()