Make the quote preview work with updates

This commit is contained in:
Nicolas Stepien 2011-05-09 18:34:51 +02:00
parent 5cfb8726d1
commit 19bfaa923d
2 changed files with 11 additions and 2 deletions

View File

@ -1706,6 +1706,11 @@
className: 'backlink',
textContent: '>>' + id
});
if ($.config('Quote Preview')) {
$.bind(link, 'mouseover', quotePreview.mouseover);
$.bind(link, 'mousemove', ui.hover);
$.bind(link, 'mouseout', ui.hoverend);
}
return $.before($('br, blockquote', el), link);
}
}
@ -1728,7 +1733,7 @@
},
node: function(root) {
var quote, _i, _len, _ref, _results;
_ref = $$('a.quotelink, a.backlink', root);
_ref = $$('a.quotelink', root);
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
quote = _ref[_i];

View File

@ -1359,6 +1359,10 @@ quoteBacklink =
href: '#'+id
className: 'backlink'
textContent: '>>'+id
if $.config 'Quote Preview'
$.bind link, 'mouseover', quotePreview.mouseover
$.bind link, 'mousemove', ui.hover
$.bind link, 'mouseout', ui.hoverend
$.before $('br, blockquote', el), link
quotePreview =
@ -1370,7 +1374,7 @@ quotePreview =
$.hide preview
$.append d.body, preview
node: (root) ->
for quote in $$ 'a.quotelink, a.backlink', root
for quote in $$ 'a.quotelink', root
$.bind quote, 'mouseover', quotePreview.mouseover
$.bind quote, 'mousemove', ui.hover
$.bind quote, 'mouseout', ui.hoverend