Fixed #31493 -- Replaced var with const and let keywords in JavaScript.

The eslint configuration and the admin script compress.py have been
updated for ES6.

The unused fallback of globals.django in jquery.init.js was removed. It
is always included before jsi18n-mocks.test.js and it always sets the
global value.
This commit is contained in:
Jon Dufresne 2020-04-20 17:39:15 -07:00 committed by Carlton Gibson
parent 0dafadadb9
commit 5d37cc703b
30 changed files with 401 additions and 406 deletions

View file

@ -9,7 +9,7 @@ QUnit.module('admin.actions', {
window._actions_icnt = '100';
/* eslint-enable */
var $ = django.jQuery;
const $ = django.jQuery;
$('#qunit-fixture').append($('#result-table').text());
$('tr input.action-select').actions();
@ -17,7 +17,7 @@ QUnit.module('admin.actions', {
});
QUnit.test('check', function(assert) {
var $ = django.jQuery;
const $ = django.jQuery;
assert.notOk($('.action-select').is(':checked'));
$('#action-toggle').click();
assert.ok($('.action-select').is(':checked'));