commit 56a0d92b8efcf554de463e33f3c493cc13306951 Author: dave ferrara Date: Mon May 8 12:53:46 2017 -0600 views-refreshview-2199049-18 diff --git a/js/ajax_view.js b/js/ajax_view.js index aa10a00..06f097a 100644 --- a/js/ajax_view.js +++ b/js/ajax_view.js @@ -63,23 +63,22 @@ Drupal.views.ajaxView = function(settings) { // Store Drupal.ajax objects here for all pager links. this.links = []; - // Add the ajax to pagers. - this.$view - // Don't attach to nested views. Doing so would attach multiple behaviors - // to a given element. - .filter(jQuery.proxy(this.filterNestedViews, this)) - .once(jQuery.proxy(this.attachPagerAjax, this)); - // Add a trigger to update this view specifically. In order to trigger a // refresh use the following code. // // @code // jQuery('.view-name').trigger('RefreshView'); // @endcode - // Add a trigger to update this view specifically. var self_settings = this.element_settings; self_settings.event = 'RefreshView'; this.refreshViewAjax = new Drupal.ajax(this.selector, this.$view, self_settings); + + // Add the ajax to pagers. + this.$view + // Don't attach to nested views. Doing so would attach multiple behaviors + // to a given element. + .filter(jQuery.proxy(this.filterNestedViews, this)) + .once(jQuery.proxy(this.attachPagerAjax, this)); }; Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {