don't repeat yourself

This commit is contained in:
James Campos 2011-07-20 14:19:43 -07:00
parent 703bd033f6
commit a064101244
2 changed files with 4 additions and 2 deletions

View File

@ -2510,7 +2510,8 @@
g.callbacks.push(imgExpand.node); g.callbacks.push(imgExpand.node);
imgExpand.dialog(); imgExpand.dialog();
$.bind(window, 'resize', imgExpand.resize); $.bind(window, 'resize', imgExpand.resize);
return imgExpand.style = $.addStyle("body.fitheight img[md5] + img { max-height: " + d.body.clientHeight + "px }"); imgExpand.style = $.addStyle('');
return imgExpand.resize();
}, },
node: function(root) { node: function(root) {
var a, thumb; var a, thumb;

View File

@ -1888,7 +1888,8 @@ imgExpand =
g.callbacks.push imgExpand.node g.callbacks.push imgExpand.node
imgExpand.dialog() imgExpand.dialog()
$.bind window, 'resize', imgExpand.resize $.bind window, 'resize', imgExpand.resize
imgExpand.style = $.addStyle "body.fitheight img[md5] + img { max-height: #{d.body.clientHeight}px }" imgExpand.style = $.addStyle ''
imgExpand.resize()
node: (root) -> node: (root) ->
return unless thumb = $ 'img[md5]', root return unless thumb = $ 'img[md5]', root