block status bar when image hovering

This commit is contained in:
James Campos 2011-05-29 15:53:04 -07:00
parent a09049472c
commit 268c5f592b
2 changed files with 23 additions and 3 deletions

View File

@ -2194,21 +2194,32 @@
},
cb: {
node: function(root) {
var thumb;
var a, thumb;
if (!(thumb = $('img[md5]', root))) {
return;
}
a = thumb.parentNode;
a.setAttribute('data-href', a.href);
a.removeAttribute('href');
$.bind(thumb, 'mouseover', imageHover.cb.mouseover);
$.bind(thumb, 'mousemove', ui.hover);
return $.bind(thumb, 'mouseout', ui.hoverend);
$.bind(thumb, 'mouseout', ui.hoverend);
return $.bind(thumb, 'mouseout', imageHover.cb.mouseout);
},
mouseover: function(e) {
var el;
var a, el;
a = this.parentNode;
a.href = a.dataset.href;
el = $('#iHover');
el.src = null;
el.src = this.parentNode.href;
ui.el = el;
return $.show(el);
},
mouseout: function(e) {
var a;
a = this.parentNode;
return a.removeAttribute('href');
}
}
};

View File

@ -1681,15 +1681,24 @@ imageHover =
cb:
node: (root) ->
return unless thumb = $ 'img[md5]', root
a = thumb.parentNode
a.setAttribute 'data-href', a.href
a.removeAttribute 'href'
$.bind thumb, 'mouseover', imageHover.cb.mouseover
$.bind thumb, 'mousemove', ui.hover
$.bind thumb, 'mouseout', ui.hoverend
$.bind thumb, 'mouseout', imageHover.cb.mouseout
mouseover: (e) ->
a = @parentNode
a.href = a.dataset.href
el = $ '#iHover'
el.src = null
el.src = @parentNode.href
ui.el = el
$.show el
mouseout: (e) ->
a = @parentNode
a.removeAttribute 'href'
imgPreloading =
init: ->