Project

General

Profile

Actions

Defect #13811

closed

Broken javascript in IE7 ; recurrence of #12195

Added by Adrian Wilkins over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

This is a recurrence of #12195 caused by a stray comma in application.js (as detailed below).

In 'public/javascripts/application.js'


function observeAutocompleteField(fieldId, url, options) {
  $(document).ready(function() {
    $('#'+fieldId).autocomplete($.extend({
      source: url,
      minLength: 2,
      search: function(){$('#'+fieldId).addClass('ajax-loading');},
      response: function(){$('#'+fieldId).removeClass('ajax-loading');},
    }, options));                                                      ^ extra comma that IE 7 hates
    $('#'+fieldId).addClass('autocomplete');
  });
}

This breaks the subsequent loading of all other functions in application.js, which halts most Javascript execution because adding warnLeavingUnsavedMessage to the window.load event is the first thing every page does.

This class of problem is picked up by JSHint, which is available as a standard syntax check in my favoured web editor, Komodo Edit ; have taken liberty of patching away all it's complaints about

  • Semicolons
  • Commas
  • Comparison operators

.. attached to issue.

Have not done anything about other warnings ; the one that concerned me most was the warning about a fall-through in a case statement, but without a comment to the contrary and no familiarity with the code, cannot be sure this is not intentional.


Files

application.js (16.3 KB) application.js Partially cleaned up application.js (from POV of JSHint) Adrian Wilkins, 2013-04-18 18:27

Related issues

Related to Redmine - Feature #10286: Auto-populate fields while creating a new user with LDAPClosedJean-Philippe Lang

Actions
Actions #1

Updated by Toshi MARUYAMA over 11 years ago

  • Target version set to 2.3.1
Actions #2

Updated by Toshi MARUYAMA over 11 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Committed in trunk and 2.3-stable, thanks.

Actions

Also available in: Atom PDF