fix image expansion on updated posts

This commit is contained in:
James Campos 2011-04-25 20:03:07 -07:00
parent 9dd34853a0
commit a86d5aad5f
2 changed files with 2 additions and 2 deletions

View File

@ -1872,7 +1872,7 @@
for (_i = 0, _len = _ref2.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
thumb = _ref2[_i]; thumb = _ref2[_i];
$.bind(thumb.parentNode, 'click', imgExpand.cb.toggle); $.bind(thumb.parentNode, 'click', imgExpand.cb.toggle);
_results.push(imgExpand.on ? imgExpand.expand(thumb.parentNode) : void 0); _results.push(imgExpand.on ? imgExpand.toggle(thumb) : void 0);
} }
return _results; return _results;
}, },

View File

@ -1426,7 +1426,7 @@ imgExpand =
node: (root) -> node: (root) ->
for thumb in $$ 'img[md5]', root for thumb in $$ 'img[md5]', root
$.bind thumb.parentNode, 'click', imgExpand.cb.toggle $.bind thumb.parentNode, 'click', imgExpand.cb.toggle
if imgExpand.on then imgExpand.expand thumb.parentNode if imgExpand.on then imgExpand.toggle thumb
toggle: (e) -> toggle: (e) ->
return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0 return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0
e.preventDefault() e.preventDefault()