workaround problem of browser loading all images at once by limiting hidden images...
authorGuillaume Cottenceau <gcottenc@gmail.com>
Tue, 13 Oct 2009 11:32:26 +0000 (13:32 +0200)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Tue, 13 Oct 2009 11:32:26 +0000 (13:32 +0200)
bin/booh-backend

index a1d1642..8d1dc4f 100644 (file)
@@ -1275,7 +1275,7 @@ def walk_source_dir
                 for sizeobj in $images_size
                     html = $html_images.collect { |l| l.clone }
                     images4js = fullscreen_images[sizeobj['name']].collect { |e| "\"#{e}\"" }.join(', ')
-                    hiddenimages4remotes = '<span style="display:none">' + fullscreen_images[sizeobj['name']].collect { |e| "<img src=\"#{e}\"/>" }.join('') + '</span>'
+                    hiddenimages4remotes = '<span style="display:none">' + fullscreen_images[sizeobj['name']][0..4].collect { |e| "<img src=\"#{e}\"/>" }.join('') + '</span>'
                     otherimages4js = ''
                     othersizes = []
                     for sizeobj2 in all_images_sizes