block status bar when hovering quotes
This commit is contained in:
parent
3c089f6ec8
commit
a09049472c
@ -1746,10 +1746,10 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
link = $.el('a', {
|
link = $.el('a', {
|
||||||
href: '#' + id,
|
|
||||||
className: 'backlink',
|
className: 'backlink',
|
||||||
textContent: '>>' + id
|
textContent: '>>' + id
|
||||||
});
|
});
|
||||||
|
link.setAttribute('data-href', '#' + id);
|
||||||
if ($.config('Quote Preview')) {
|
if ($.config('Quote Preview')) {
|
||||||
$.bind(link, 'mouseover', quotePreview.mouseover);
|
$.bind(link, 'mouseover', quotePreview.mouseover);
|
||||||
$.bind(link, 'mousemove', ui.hover);
|
$.bind(link, 'mousemove', ui.hover);
|
||||||
@ -1879,6 +1879,8 @@
|
|||||||
if (!quote.hash) {
|
if (!quote.hash) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
quote.setAttribute('data-href', quote.href);
|
||||||
|
quote.removeAttribute('href');
|
||||||
$.bind(quote, 'mouseover', quotePreview.mouseover);
|
$.bind(quote, 'mouseover', quotePreview.mouseover);
|
||||||
$.bind(quote, 'mousemove', ui.hover);
|
$.bind(quote, 'mousemove', ui.hover);
|
||||||
$.bind(quote, 'mouseout', ui.hoverend);
|
$.bind(quote, 'mouseout', ui.hoverend);
|
||||||
@ -1886,15 +1888,17 @@
|
|||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
mouseout: function() {
|
mouseout: function(e) {
|
||||||
var el;
|
var el, id;
|
||||||
if (!(el = d.getElementById(this.hash.slice(1)))) {
|
id = this.hash.slice(1);
|
||||||
return;
|
this.removeAttribute('href');
|
||||||
|
if (el = d.getElementById(id)) {
|
||||||
|
return $.removeClass(el, 'qphl');
|
||||||
}
|
}
|
||||||
return $.removeClass(el, 'qphl');
|
|
||||||
},
|
},
|
||||||
mouseover: function(e) {
|
mouseover: function(e) {
|
||||||
var el, id, qp, quote, replyID, threadID, _i, _len, _ref, _ref2;
|
var el, id, qp, quote, replyID, threadID, _i, _len, _ref, _ref2;
|
||||||
|
this.href = this.dataset.href;
|
||||||
id = this.hash.slice(1);
|
id = this.hash.slice(1);
|
||||||
qp = $('#qp');
|
qp = $('#qp');
|
||||||
if (el = d.getElementById(id)) {
|
if (el = d.getElementById(id)) {
|
||||||
@ -2544,6 +2548,9 @@
|
|||||||
cursor: pointer;\
|
cursor: pointer;\
|
||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
|
.backlink, .quotelink {\
|
||||||
|
text-decoration: underline;\
|
||||||
|
}\
|
||||||
.new {\
|
.new {\
|
||||||
background: lime;\
|
background: lime;\
|
||||||
}\
|
}\
|
||||||
|
|||||||
@ -1395,9 +1395,9 @@ quoteBacklink =
|
|||||||
for qid, quote of quotes
|
for qid, quote of quotes
|
||||||
continue unless el = d.getElementById qid
|
continue unless el = d.getElementById qid
|
||||||
link = $.el 'a',
|
link = $.el 'a',
|
||||||
href: '#'+id
|
|
||||||
className: 'backlink'
|
className: 'backlink'
|
||||||
textContent: '>>'+id
|
textContent: '>>'+id
|
||||||
|
link.setAttribute 'data-href', '#'+id
|
||||||
if $.config 'Quote Preview'
|
if $.config 'Quote Preview'
|
||||||
$.bind link, 'mouseover', quotePreview.mouseover
|
$.bind link, 'mouseover', quotePreview.mouseover
|
||||||
$.bind link, 'mousemove', ui.hover
|
$.bind link, 'mousemove', ui.hover
|
||||||
@ -1480,14 +1480,21 @@ quotePreview =
|
|||||||
node: (root) ->
|
node: (root) ->
|
||||||
for quote in $$ 'a.quotelink, a.backlink', root
|
for quote in $$ 'a.quotelink, a.backlink', root
|
||||||
continue unless quote.hash
|
continue unless quote.hash
|
||||||
|
# XXX this needs a globalEval (wtf?) on firefox 6.0a2 / scriptish
|
||||||
|
# quote.dataset.href = quote.href
|
||||||
|
quote.setAttribute 'data-href', quote.href
|
||||||
|
quote.removeAttribute 'href'
|
||||||
$.bind quote, 'mouseover', quotePreview.mouseover
|
$.bind quote, 'mouseover', quotePreview.mouseover
|
||||||
$.bind quote, 'mousemove', ui.hover
|
$.bind quote, 'mousemove', ui.hover
|
||||||
$.bind quote, 'mouseout', ui.hoverend
|
$.bind quote, 'mouseout', ui.hoverend
|
||||||
$.bind quote, 'mouseout', quotePreview.mouseout
|
$.bind quote, 'mouseout', quotePreview.mouseout
|
||||||
mouseout: ->
|
mouseout: (e) ->
|
||||||
return unless el = d.getElementById @hash[1..]
|
id = @hash[1..]
|
||||||
$.removeClass el, 'qphl'
|
@.removeAttribute 'href'
|
||||||
|
if el = d.getElementById id
|
||||||
|
$.removeClass el, 'qphl'
|
||||||
mouseover: (e) ->
|
mouseover: (e) ->
|
||||||
|
@href = @dataset.href
|
||||||
id = @hash[1..]
|
id = @hash[1..]
|
||||||
qp = $ '#qp'
|
qp = $ '#qp'
|
||||||
if el = d.getElementById id
|
if el = d.getElementById id
|
||||||
@ -1954,6 +1961,9 @@ main =
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.backlink, .quotelink {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
.new {
|
.new {
|
||||||
background: lime;
|
background: lime;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user