Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be better to provide a loader with CSS instead of hard coding the image asset into the javascript file.
Original report:
It would be good if the loader image used css rather than a hard coded img tag. That way a themer could use CSS to override the look of the loader quickly without having to hack into the module or override the theme function. You could use the standard views loader by default by giving it a class of views-throbbing.
I haven't got CVS sorted yet so can't make a patch but replacing line 32 in views_infinite_scroll.js with:
var img = '
';
worked fine for me
Comment | File | Size | Author |
---|---|---|---|
#2 | 1040460-css-loader.patch | 1.55 KB | fearlsgroove |
Comments
Comment #1
andrew_k CreditAttribution: andrew_k commentedHa ok try this
Comment #2
fearlsgroove CreditAttribution: fearlsgroove at Alloy Magnetic commentedAttached patch removes the hard coded image, puts the loading text in as an accessible string, and applies the image as a background via CSS. It should be trivial to override in a theme by overriding the stylesheet completely or just using
.views_infinite_scroll-ajax-loader
Comment #3
Honza Pobořil CreditAttribution: Honza Pobořil as a volunteer commented