4b7d9959fd5234e257f4674295715a30c94c80ce
[yaffs-website] / js / modules / views / ajax_view.js
1 /**
2  * @file
3  * Extends core ajax_view.js.
4  */
5
6 (function ($, Drupal) {
7   'use strict';
8
9   /**
10    * @method
11    */
12   Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
13     var that = this;
14     this.exposedFormAjax = [];
15     $('button[type=submit], input[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) {
16       var self_settings = $.extend({}, that.element_settings, {
17         base: $(this).attr('id'),
18         element: this
19       });
20       that.exposedFormAjax[index] = Drupal.ajax(self_settings);
21     });
22   };
23
24 })(jQuery, Drupal);