changeset 483:3ac558402014

For #232, added some javascript to resize pics inside forum posts if they are too big.
author Brian Neal <bgneal@gmail.com>
date Sat, 15 Oct 2011 22:04:18 +0000 (2011-10-15)
parents dc4638f37c22
children bbbc357ac5f3
files gpp/forums/static/js/forums.js
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/forums/static/js/forums.js	Fri Oct 14 02:12:05 2011 +0000
+++ b/gpp/forums/static/js/forums.js	Sat Oct 15 22:04:18 2011 +0000
@@ -287,4 +287,11 @@
    }
 
    initAttachments();
+
+   $('div.forum-post-body img').fadeIn('fast', function() {
+         var pic = $(this);
+         if (pic.width() > 720) {
+            pic.css('width', '720px');
+         }
+   });
 });