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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user