Use static hourglass image instead of an animages GIF during image loading, remove usage of scrollstop, start generating previews much sooner (threshold of 400 pixels), remove fallback code when javascript is disabled, show pages previews as a vertical scroller seems to reduce lag and browser memory consumption.

This commit is contained in:
Roberto Rosario
2014-11-17 16:56:28 -04:00
parent eff81cf8af
commit d751425d7f
6 changed files with 6 additions and 80 deletions

View File

@@ -54,7 +54,7 @@ def staging_file_html_widget(staging_file, click_view=None, page=DEFAULT_PAGE_NU
if nolazyload:
result.append(u'<img style="border: 1px solid black;" src="%s" alt="%s" />' % (preview_view, alt_text))
else:
result.append(u'<img class="thin_border %s" data-src="%s" src="%simages/ajax-loader.gif" alt="%s" />' % (image_class, preview_view, settings.STATIC_URL, alt_text))
result.append(u'<img class="thin_border %s" data-src="%s" src="%smain/icons/hourglass.png" alt="%s" />' % (image_class, preview_view, settings.STATIC_URL, alt_text))
result.append(u'<noscript><img style="border: 1px solid black;" src="%s" alt="%s" /></noscript>' % (preview_view, alt_text))
if click_view: