backlinks container

This commit is contained in:
James Campos 2011-05-27 05:11:20 -07:00
parent 9d128c5509
commit 1b9fdd5479
2 changed files with 10 additions and 4 deletions

View File

@ -1711,10 +1711,14 @@
return g.callbacks.push(quoteBacklink.node); return g.callbacks.push(quoteBacklink.node);
}, },
node: function(root) { node: function(root) {
var el, id, link, qid, quote, quotes, tid, _i, _len, _ref, _results; var container, el, id, link, qid, quote, quotes, tid, _i, _len, _ref, _results;
if (root.className) { if (root.className) {
return; return;
} }
container = $.el('span', {
className: 'container'
});
$.before($('br, blockquote', root), container);
id = root.id || $('td[id]', root).id; id = root.id || $('td[id]', root).id;
quotes = {}; quotes = {};
tid = g.THREAD_ID || root.parentNode.firstChild.id; tid = g.THREAD_ID || root.parentNode.firstChild.id;
@ -1749,7 +1753,7 @@
if ($.config('Quote Inline')) { if ($.config('Quote Inline')) {
$.bind(link, 'click', quoteInline.toggle); $.bind(link, 'click', quoteInline.toggle);
} }
_results.push($.before($('td > br, blockquote', el), link)); _results.push($.append($('.container', el), link));
} }
return _results; return _results;
} }

View File

@ -1381,7 +1381,9 @@ quoteBacklink =
g.callbacks.push quoteBacklink.node g.callbacks.push quoteBacklink.node
node: (root) -> node: (root) ->
return if root.className return if root.className
#better coffee-script way of doing this? container = $.el 'span',
className: 'container'
$.before $('br, blockquote', root), container
id = root.id or $('td[id]', root).id id = root.id or $('td[id]', root).id
quotes = {} quotes = {}
tid = g.THREAD_ID or root.parentNode.firstChild.id tid = g.THREAD_ID or root.parentNode.firstChild.id
@ -1404,7 +1406,7 @@ quoteBacklink =
$.bind link, 'mouseout', quotePreview.mouseout $.bind link, 'mouseout', quotePreview.mouseout
if $.config 'Quote Inline' if $.config 'Quote Inline'
$.bind link, 'click', quoteInline.toggle $.bind link, 'click', quoteInline.toggle
$.before $('td > br, blockquote', el), link $.append $('.container', el), link
quoteInline = quoteInline =
init: -> init: ->