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

CommentFileSizeAuthor
#2 1040460-css-loader.patch1.55 KBfearlsgroove
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrew_k’s picture

Ha ok try this

 var img  = '<div id="views_infinite_scroll-ajax-loader"><a class="views-throbbing"></a></div>';
fearlsgroove’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Category: Feature request » Bug report
Issue summary: View changes
Status: Active » Needs review
FileSize
1.55 KB

Attached 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

Honza Pobořil’s picture

Status: Needs review » Closed (outdated)