Issue #2916294 by dawehner: JS codestyle: no-useless-escape
parent
ff6381f7cf
commit
7fbb5e990e
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"extends": "./.eslintrc.json",
|
"extends": "./.eslintrc.json",
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-useless-escape": "off",
|
|
||||||
"no-use-before-define": "off",
|
"no-use-before-define": "off",
|
||||||
"no-throw-literal": "off",
|
"no-throw-literal": "off",
|
||||||
"no-shadow": "off",
|
"no-shadow": "off",
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
// should be returned to the same state it was in before the columns
|
// should be returned to the same state it was in before the columns
|
||||||
// were revealed, so it is necessary to remove the display none value
|
// were revealed, so it is necessary to remove the display none value
|
||||||
// from the style attribute.
|
// from the style attribute.
|
||||||
const match = /^display\s*\:\s*none$/;
|
const match = /^display\s*:\s*none$/;
|
||||||
for (let i = 0; i < properties.length; i++) {
|
for (let i = 0; i < properties.length; i++) {
|
||||||
const prop = properties[i];
|
const prop = properties[i];
|
||||||
prop.trim();
|
prop.trim();
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
var properties = $cell.attr('style').split(';');
|
var properties = $cell.attr('style').split(';');
|
||||||
var newProps = [];
|
var newProps = [];
|
||||||
|
|
||||||
var match = /^display\s*\:\s*none$/;
|
var match = /^display\s*:\s*none$/;
|
||||||
for (var i = 0; i < properties.length; i++) {
|
for (var i = 0; i < properties.length; i++) {
|
||||||
var prop = properties[i];
|
var prop = properties[i];
|
||||||
prop.trim();
|
prop.trim();
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@
|
||||||
.find('input')
|
.find('input')
|
||||||
.addClass('error')
|
.addClass('error')
|
||||||
.attr('aria-invalid', 'true');
|
.attr('aria-invalid', 'true');
|
||||||
$(`<div class=\"description\" >${Drupal.t('Please provide a name for the button group.')}</div>`).insertAfter(form.elements[0]);
|
$(`<div class="description" >${Drupal.t('Please provide a name for the button group.')}</div>`).insertAfter(form.elements[0]);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
.on('change', function () {
|
.on('change', function () {
|
||||||
// If the filename is fully the language code or the filename
|
// If the filename is fully the language code or the filename
|
||||||
// ends with a language code, pre-select that one.
|
// ends with a language code, pre-select that one.
|
||||||
const matches = $(this).val().match(/([^.][\.]*)([\w-]+)\.po$/);
|
const matches = $(this).val().match(/([^.][.]*)([\w-]+)\.po$/);
|
||||||
if (matches && $langcode.find(`option[value="${matches[2]}"]`).length) {
|
if (matches && $langcode.find(`option[value="${matches[2]}"]`).length) {
|
||||||
$langcode.val(matches[2]);
|
$langcode.val(matches[2]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
if ($form.length) {
|
if ($form.length) {
|
||||||
var $langcode = $form.find('.langcode-input');
|
var $langcode = $form.find('.langcode-input');
|
||||||
$form.find('.file-import-input').on('change', function () {
|
$form.find('.file-import-input').on('change', function () {
|
||||||
var matches = $(this).val().match(/([^.][\.]*)([\w-]+)\.po$/);
|
var matches = $(this).val().match(/([^.][.]*)([\w-]+)\.po$/);
|
||||||
if (matches && $langcode.find('option[value="' + matches[2] + '"]').length) {
|
if (matches && $langcode.find('option[value="' + matches[2] + '"]').length) {
|
||||||
$langcode.val(matches[2]);
|
$langcode.val(matches[2]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
const fieldModel = this.fieldModel;
|
const fieldModel = this.fieldModel;
|
||||||
|
|
||||||
// Generate a DOM-compatible ID for the form container DOM element.
|
// Generate a DOM-compatible ID for the form container DOM element.
|
||||||
const id = `quickedit-form-for-${fieldModel.id.replace(/[\/\[\]]/g, '_')}`;
|
const id = `quickedit-form-for-${fieldModel.id.replace(/[/[\]]/g, '_')}`;
|
||||||
|
|
||||||
// Render form container.
|
// Render form container.
|
||||||
const $formContainer = $(Drupal.theme('quickeditFormContainer', {
|
const $formContainer = $(Drupal.theme('quickeditFormContainer', {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
loadForm: function loadForm() {
|
loadForm: function loadForm() {
|
||||||
var fieldModel = this.fieldModel;
|
var fieldModel = this.fieldModel;
|
||||||
|
|
||||||
var id = 'quickedit-form-for-' + fieldModel.id.replace(/[\/\[\]]/g, '_');
|
var id = 'quickedit-form-for-' + fieldModel.id.replace(/[/[\]]/g, '_');
|
||||||
|
|
||||||
var $formContainer = $(Drupal.theme('quickeditFormContainer', {
|
var $formContainer = $(Drupal.theme('quickeditFormContainer', {
|
||||||
id: id,
|
id: id,
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@
|
||||||
save() {
|
save() {
|
||||||
const fieldModel = this.fieldModel;
|
const fieldModel = this.fieldModel;
|
||||||
const editorModel = this.model;
|
const editorModel = this.model;
|
||||||
const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[\/\[\]\_\s]/g, '-')}`;
|
const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[/[\]_\s]/g, '-')}`;
|
||||||
|
|
||||||
function fillAndSubmitForm(value) {
|
function fillAndSubmitForm(value) {
|
||||||
const $form = $(`#${backstageId}`).find('form');
|
const $form = $(`#${backstageId}`).find('form');
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
save: function save() {
|
save: function save() {
|
||||||
var fieldModel = this.fieldModel;
|
var fieldModel = this.fieldModel;
|
||||||
var editorModel = this.model;
|
var editorModel = this.model;
|
||||||
var backstageId = 'quickedit_backstage-' + this.fieldModel.id.replace(/[\/\[\]\_\s]/g, '-');
|
var backstageId = 'quickedit_backstage-' + this.fieldModel.id.replace(/[/[\]_\s]/g, '-');
|
||||||
|
|
||||||
function fillAndSubmitForm(value) {
|
function fillAndSubmitForm(value) {
|
||||||
var $form = $('#' + backstageId).find('form');
|
var $form = $('#' + backstageId).find('form');
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
this.$root = this.$el;
|
this.$root = this.$el;
|
||||||
|
|
||||||
// Generate a DOM-compatible ID for the form container DOM element.
|
// Generate a DOM-compatible ID for the form container DOM element.
|
||||||
this._id = `quickedit-toolbar-for-${this.model.id.replace(/[\/\[\]]/g, '_')}`;
|
this._id = `quickedit-toolbar-for-${this.model.id.replace(/[/[\]]/g, '_')}`;
|
||||||
|
|
||||||
this.listenTo(this.model, 'change:state', this.stateChange);
|
this.listenTo(this.model, 'change:state', this.stateChange);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
this.$root = this.$el;
|
this.$root = this.$el;
|
||||||
|
|
||||||
this._id = 'quickedit-toolbar-for-' + this.model.id.replace(/[\/\[\]]/g, '_');
|
this._id = 'quickedit-toolbar-for-' + this.model.id.replace(/[/[\]]/g, '_');
|
||||||
|
|
||||||
this.listenTo(this.model, 'change:state', this.stateChange);
|
this.listenTo(this.model, 'change:state', this.stateChange);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,8 @@
|
||||||
},
|
},
|
||||||
// HTML segments for tip layout.
|
// HTML segments for tip layout.
|
||||||
template: {
|
template: {
|
||||||
link: '<a href=\"#close\" class=\"joyride-close-tip\">×</a>',
|
link: '<a href="#close" class="joyride-close-tip">×</a>',
|
||||||
button: '<a href=\"#\" class=\"button button--primary joyride-next-tip\"></a>',
|
button: '<a href="#" class="button button--primary joyride-next-tip"></a>',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.model.set({ isActive: true, activeTour: $tour });
|
this.model.set({ isActive: true, activeTour: $tour });
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
template: {
|
template: {
|
||||||
link: '<a href=\"#close\" class=\"joyride-close-tip\">×</a>',
|
link: '<a href="#close" class="joyride-close-tip">×</a>',
|
||||||
button: '<a href=\"#\" class=\"button button--primary joyride-next-tip\"></a>'
|
button: '<a href="#" class="button button--primary joyride-next-tip"></a>'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.model.set({ isActive: true, activeTour: $tour });
|
this.model.set({ isActive: true, activeTour: $tour });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue