Merge pull request #107 from MayhemYDG/hl

Highlight quoted post during quote preview. close #81
This commit is contained in:
James Campos 2011-05-19 12:29:17 -07:00
commit aa93cd8710
2 changed files with 20 additions and 7 deletions

View File

@ -1707,6 +1707,7 @@
$.bind(link, 'mouseover', quotePreview.mouseover);
$.bind(link, 'mousemove', ui.hover);
$.bind(link, 'mouseout', ui.hoverend);
$.bind(link, 'mouseout', quotePreview.mouseout);
}
if ($.config('Quote Inline')) {
$.bind(link, 'click', quoteInline.toggle);
@ -1825,10 +1826,14 @@
quote = _ref[_i];
$.bind(quote, 'mouseover', quotePreview.mouseover);
$.bind(quote, 'mousemove', ui.hover);
_results.push($.bind(quote, 'mouseout', ui.hoverend));
$.bind(quote, 'mouseout', ui.hoverend);
_results.push($.bind(quote, 'mouseout', quotePreview.mouseout));
}
return _results;
},
mouseout: function() {
return $.removeClass(d.getElementById(this.hash.slice(1)), 'qphl');
},
mouseover: function(e) {
var el, id, qp, req, threadID;
if (!(id = this.hash.slice(1))) {
@ -1837,6 +1842,7 @@
qp = $('#qp');
if (el = d.getElementById(id)) {
qp.innerHTML = el.innerHTML;
$.addClass(el, 'qphl');
} else {
qp.innerHTML = "Loading " + id + "...";
threadID = this.pathname.split('/').pop();
@ -2456,13 +2462,11 @@
}\
\
#navlinks {\
font-size: 16px;\
position: fixed;\
top: 25px;\
right: 5px;\
}\
#navlinks {\
font-size: 16px;\
}\
\
#options {\
position: fixed;\
@ -2562,6 +2566,9 @@
#qp input {\
display: none;\
}\
.qphl {\
outline: 2px solid rgba(216, 94, 49, .7);\
}\
'
};
main.init();

View File

@ -1374,6 +1374,7 @@ quoteBacklink =
$.bind link, 'mouseover', quotePreview.mouseover
$.bind link, 'mousemove', ui.hover
$.bind link, 'mouseout', ui.hoverend
$.bind link, 'mouseout', quotePreview.mouseout
if $.config 'Quote Inline'
$.bind link, 'click', quoteInline.toggle
$.before $('td > br, blockquote', el), link
@ -1452,11 +1453,15 @@ quotePreview =
$.bind quote, 'mouseover', quotePreview.mouseover
$.bind quote, 'mousemove', ui.hover
$.bind quote, 'mouseout', ui.hoverend
$.bind quote, 'mouseout', quotePreview.mouseout
mouseout: ->
$.removeClass d.getElementById(@hash[1..]), 'qphl'
mouseover: (e) ->
return unless id = @hash[1..]
qp = $ '#qp'
if el = d.getElementById id
qp.innerHTML = el.innerHTML
$.addClass el, 'qphl'
else
qp.innerHTML = "Loading #{id}..."
threadID = @pathname.split('/').pop()
@ -1920,13 +1925,11 @@ main =
}
#navlinks {
font-size: 16px;
position: fixed;
top: 25px;
right: 5px;
}
#navlinks {
font-size: 16px;
}
#options {
position: fixed;
@ -2026,6 +2029,9 @@ main =
#qp input {
display: none;
}
.qphl {
outline: 2px solid rgba(216, 94, 49, .7);
}
'
main.init()