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.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Adds loading styles to ajax pagered views. Doesn't replace the Drupal throbber (you can do that yourself), but extends the view's DOM element.
It adds global event triggers to customize that style. A very simple loading class + animation is implemented:
// Implement custom event: BEFORE ajax.
$window.bind('afterBeforeSendViewsPager', function(e) {
e.options.$view.addClass('loading');
});
// Implement custom event: AFTER ajax.
$window.bind('afterCompleteViewsPager', function(e) {
e.options.$view.removeClass('loading');
});
NOTE this module requires a Views patch, because #2051869: this.pagerAjax in attachPagerLinkAjax() is overwritten by every next link.
Project information
- Created by rudiedirkx on , updated