Attached is the full list of errors found by ESLint and the patch that fixes them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nikhilesh Gupta created an issue. See original summary.

Nikhilesh Gupta’s picture

Issue tags: +JavaScript clean-up
Chris Matthews’s picture

Version: 7.x-3.13 » 7.x-3.x-dev
Assigned: Nikhilesh Gupta » Unassigned
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch to ajax.js does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.

Checking patch js/ajax.js...
error: while searching for:
      // We need to do this for both .click() and .mousedown() since JavaScript
      // code might trigger either behavior.
      var $submit_buttons = $('input[type=submit], button', ajax_body);
      $submit_buttons.click(function(event) {
        this.form.clk = this;
      });
      $submit_buttons.mousedown(function(event) {
        this.form.clk = this;
      });

      $('form', ajax_body).once('views-ajax-submit-processed').each(function() {
        var element_settings = { 'url': response.url, 'event': 'submit', 'progress': { 'type': 'throbber' } };
        var $form = $(this);
        var id = $form.attr('id');
        Drupal.ajax[id] = new Drupal.ajax(id, this, element_settings);

error: patch failed: js/ajax.js:17
error: js/ajax.js: patch does not apply
Andrew Answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

Patch rerolled.

Andrew Answer’s picture

DamienMcKenna’s picture

Status: Needs review » Needs work

That patch unfortunately breaks the base_element_settings variable.

Andrew Answer’s picture

Andrew Answer’s picture

Status: Needs work » Needs review
DamienMcKenna’s picture

Status: Needs review » Needs work

Please expand this to cover the other JS files too.