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