Mercurial > public > sg101
changeset 489:f785a646a5fc
For #232, add some javascript to resize large images in user comments.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 19 Oct 2011 23:31:22 +0000 |
parents | a747215e9a5a |
children | f0f3966ea44f |
files | gpp/comments/static/js/comments.js |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/comments/static/js/comments.js Wed Oct 19 01:24:46 2011 +0000 +++ b/gpp/comments/static/js/comments.js Wed Oct 19 23:31:22 2011 +0000 @@ -63,4 +63,11 @@ } return false; }); + + $('.comment-text img').fadeIn('fast', function() { + var pic = $(this); + if (pic.width() > 720) { + pic.css('width', '720px'); + } + }); });