This commit is contained in:
Nicolas Stepien 2012-05-18 05:54:07 +02:00
parent 5d65027b5d
commit 9a046ab3c6
2 changed files with 5 additions and 2 deletions

View File

@ -3775,7 +3775,8 @@
},
contract: function(thumb) {
thumb.hidden = false;
return thumb.nextSibling.hidden = true;
thumb.nextSibling.hidden = true;
return $.removeClass(thumb.parentNode.parentNode.parentNode, 'image_expanded');
},
expand: function(thumb, url) {
var a, img;
@ -3783,6 +3784,7 @@
return;
}
thumb.hidden = true;
$.addClass(thumb.parentNode.parentNode.parentNode, 'image_expanded');
if (img = thumb.nextSibling) {
img.hidden = false;
return;

View File

@ -2856,12 +2856,13 @@ ImageExpand =
contract: (thumb) ->
thumb.hidden = false
thumb.nextSibling.hidden = true
$.removeClass thumb.parentNode.parentNode.parentNode, 'image_expanded'
expand: (thumb, url) ->
# Do not expand images of hidden/filtered replies, or already expanded pictures.
return if $.x 'ancestor-or-self::*[@hidden]', thumb
thumb.hidden = true
$.addClass thumb.parentNode.parentNode.parentNode, 'image_expanded'
if img = thumb.nextSibling
# Expand already loaded picture
img.hidden = false