This commit is contained in:
Nicolas Stepien 2012-05-28 14:29:11 +02:00
parent e80fc5a762
commit a82665c9c1
2 changed files with 13 additions and 5 deletions

View File

@ -256,6 +256,9 @@
}
},
hoverend: function() {
if (!UI.el) {
return;
}
$.rm(UI.el);
return delete UI.el;
}
@ -3207,9 +3210,7 @@
if (/\binlined\b/.test(this.className)) {
return;
}
if (qp = $.id('qp')) {
$.rm(qp);
}
UI.hoverend();
qp = UI.el = $.el('div', {
id: 'qp',
className: 'post reply dialog'
@ -3647,6 +3648,7 @@
return $.on(post.img, 'mouseover', ImageHover.mouseover);
},
mouseover: function() {
UI.hoverend();
UI.el = $.el('img', {
id: 'ihover',
src: this.parentNode.href

View File

@ -230,6 +230,7 @@ UI =
style.right = clientWidth - clientX + 45 + 'px'
hoverend: ->
return unless UI.el
$.rm UI.el
delete UI.el
@ -2431,8 +2432,10 @@ QuotePreview =
return
mouseover: (e) ->
return if /\binlined\b/.test @className
if qp = $.id 'qp'
$.rm qp
# Make sure to remove the previous UI.el
UI.hoverend()
qp = UI.el = $.el 'div',
id: 'qp'
className: 'post reply dialog'
@ -2771,6 +2774,9 @@ ImageHover =
return unless post.img
$.on post.img, 'mouseover', ImageHover.mouseover
mouseover: ->
# Make sure to remove the previous UI.el
UI.hoverend()
UI.el = $.el 'img'
id: 'ihover'
src: @parentNode.href