comparison forums/static/js/forums.js @ 645:99f7917702ca

Fix 081a88b3bfc8, javascript resize of forum images. Commit 081a88b3bfc8 broke those pages that loaded forums.js but did not load the imagesLoaded jQuery extension. Now we have arranged it so that only the forums topic view loads imagesLoaded and put the resizing javascript inline.
author Brian Neal <bgneal@gmail.com>
date Mon, 11 Mar 2013 15:30:25 -0500
parents 081a88b3bfc8
children 92101013d5ac
comparison
equal deleted inserted replaced
644:d63c8ccc29a7 645:99f7917702ca
285 } 285 }
286 ++vid; 286 ++vid;
287 } 287 }
288 288
289 initAttachments(); 289 initAttachments();
290
291 $('div.forum-post-body img').imagesLoaded(function($images, $proper, $broken) {
292 $proper.each(function(index) {
293 var $pic = $(this);
294 if ($pic.width() > 660) {
295 $pic.css('width', '660px');
296 $pic.wrap($('<a/>').attr('href', $pic.attr('src')).attr('title', 'Click to view full size'));
297 }
298 });
299 });
300 }); 290 });