# HG changeset patch # User Brian Neal # Date 1363033825 18000 # Node ID 99f7917702ca53f8708f96d79b85394ad672811e # Parent d63c8ccc29a7a18b1ab6ee5852d7fce7eb96b65d 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. diff -r d63c8ccc29a7 -r 99f7917702ca forums/static/js/forums.js --- a/forums/static/js/forums.js Sun Mar 10 13:09:00 2013 -0500 +++ b/forums/static/js/forums.js Mon Mar 11 15:30:25 2013 -0500 @@ -287,14 +287,4 @@ } initAttachments(); - - $('div.forum-post-body img').imagesLoaded(function($images, $proper, $broken) { - $proper.each(function(index) { - var $pic = $(this); - if ($pic.width() > 660) { - $pic.css('width', '660px'); - $pic.wrap($('').attr('href', $pic.attr('src')).attr('title', 'Click to view full size')); - } - }); - }); }); diff -r d63c8ccc29a7 -r 99f7917702ca sg101/templates/forums/topic.html --- a/sg101/templates/forums/topic.html Sun Mar 10 13:09:00 2013 -0500 +++ b/sg101/templates/forums/topic.html Mon Mar 11 15:30:25 2013 -0500 @@ -11,6 +11,21 @@ {% script_tags 'imagesloaded' %} {{ form.media }} {% include "forums/jump_box.js" %} + {% endblock %} {% block content %} {% forum_navigation topic %}