Views loading

Component ID

2031711

Component name

Views loading

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

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.