summaryrefslogtreecommitdiffstats
path: root/core/modules
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules')
-rw-r--r--core/modules/block/js/block.admin.es6.js8
-rw-r--r--core/modules/block/js/block.admin.js8
-rw-r--r--core/modules/block/js/block.es6.js12
-rw-r--r--core/modules/block/js/block.js10
-rw-r--r--core/modules/content_translation/content_translation.admin.es6.js17
-rw-r--r--core/modules/content_translation/content_translation.admin.js17
-rw-r--r--core/modules/editor/js/editor.es6.js4
-rw-r--r--core/modules/editor/js/editor.js4
-rw-r--r--core/modules/menu_ui/menu_ui.es6.js26
-rw-r--r--core/modules/menu_ui/menu_ui.js26
10 files changed, 67 insertions, 65 deletions
diff --git a/core/modules/block/js/block.admin.es6.js b/core/modules/block/js/block.admin.es6.js
index 86a3e36..780ea12 100644
--- a/core/modules/block/js/block.admin.es6.js
+++ b/core/modules/block/js/block.admin.es6.js
@@ -24,7 +24,7 @@
attach(context, settings) {
const $input = $('input.block-filter-text').once('block-filter-text');
const $table = $($input.attr('data-element'));
- let $filter_rows;
+ let $filterRows;
/**
* Filters the block list.
@@ -52,7 +52,7 @@
// Filter if the length of the query is at least 2 characters.
if (query.length >= 2) {
- $filter_rows.each(toggleBlockEntry);
+ $filterRows.each(toggleBlockEntry);
Drupal.announce(
Drupal.formatPlural(
$table.find('tr:visible').length - 1,
@@ -62,14 +62,14 @@
);
}
else {
- $filter_rows.each(function (index) {
+ $filterRows.each(function (index) {
$(this).parent().parent().show();
});
}
}
if ($table.length) {
- $filter_rows = $table.find('div.block-filter-text-source');
+ $filterRows = $table.find('div.block-filter-text-source');
$input.on('keyup', debounce(filterBlockList, 200));
}
},
diff --git a/core/modules/block/js/block.admin.js b/core/modules/block/js/block.admin.js
index afc9b0b..7cafed1 100644
--- a/core/modules/block/js/block.admin.js
+++ b/core/modules/block/js/block.admin.js
@@ -10,7 +10,7 @@
attach: function attach(context, settings) {
var $input = $('input.block-filter-text').once('block-filter-text');
var $table = $($input.attr('data-element'));
- var $filter_rows = void 0;
+ var $filterRows = void 0;
function filterBlockList(e) {
var query = $(e.target).val().toLowerCase();
@@ -23,17 +23,17 @@
}
if (query.length >= 2) {
- $filter_rows.each(toggleBlockEntry);
+ $filterRows.each(toggleBlockEntry);
Drupal.announce(Drupal.formatPlural($table.find('tr:visible').length - 1, '1 block is available in the modified list.', '@count blocks are available in the modified list.'));
} else {
- $filter_rows.each(function (index) {
+ $filterRows.each(function (index) {
$(this).parent().parent().show();
});
}
}
if ($table.length) {
- $filter_rows = $table.find('div.block-filter-text-source');
+ $filterRows = $table.find('div.block-filter-text-source');
$input.on('keyup', debounce(filterBlockList, 200));
}
}
diff --git a/core/modules/block/js/block.es6.js b/core/modules/block/js/block.es6.js
index 3d1802a..0bde2ad 100644
--- a/core/modules/block/js/block.es6.js
+++ b/core/modules/block/js/block.es6.js
@@ -195,14 +195,14 @@
// Find the correct region and insert the row as the last in the
// region.
tableDrag.rowObject = new tableDrag.row(row[0]);
- const region_message = table.find(`.region-${select[0].value}-message`);
- const region_items = region_message.nextUntil('.region-message, .region-title');
- if (region_items.length) {
- region_items.last().after(row);
+ const regionMessage = table.find(`.region-${select[0].value}-message`);
+ const regionItems = regionMessage.nextUntil('.region-message, .region-title');
+ if (regionItems.length) {
+ regionItems.last().after(row);
}
- // We found that region_message is the last row.
+ // We found that regionMessage is the last row.
else {
- region_message.after(row);
+ regionMessage.after(row);
}
updateBlockWeights(table, select[0].value);
// Modify empty regions with added or removed fields.
diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js
index 0b11d54..9612dfd 100644
--- a/core/modules/block/js/block.js
+++ b/core/modules/block/js/block.js
@@ -119,12 +119,12 @@
var select = $(this);
tableDrag.rowObject = new tableDrag.row(row[0]);
- var region_message = table.find('.region-' + select[0].value + '-message');
- var region_items = region_message.nextUntil('.region-message, .region-title');
- if (region_items.length) {
- region_items.last().after(row);
+ var regionMessage = table.find('.region-' + select[0].value + '-message');
+ var regionItems = regionMessage.nextUntil('.region-message, .region-title');
+ if (regionItems.length) {
+ regionItems.last().after(row);
} else {
- region_message.after(row);
+ regionMessage.after(row);
}
updateBlockWeights(table, select[0].value);
diff --git a/core/modules/content_translation/content_translation.admin.es6.js b/core/modules/content_translation/content_translation.admin.es6.js
index 84aaf77..2253f94 100644
--- a/core/modules/content_translation/content_translation.admin.es6.js
+++ b/core/modules/content_translation/content_translation.admin.es6.js
@@ -17,10 +17,11 @@
const $context = $(context);
const options = drupalSettings.contentTranslationDependentOptions;
let $fields;
+ let dependentColumns;
- function fieldsChangeHandler($fields, dependent_columns) {
+ function fieldsChangeHandler($fields, dependentColumns) {
return function (e) {
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns, $(e.target));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns, $(e.target));
};
}
@@ -30,14 +31,14 @@
if (options && options.dependent_selectors) {
Object.keys(options.dependent_selectors).forEach((field) => {
$fields = $context.find(`input[name^="${field}"]`);
- const dependent_columns = options.dependent_selectors[field];
+ dependentColumns = options.dependent_selectors[field];
- $fields.on('change', fieldsChangeHandler($fields, dependent_columns));
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns);
+ $fields.on('change', fieldsChangeHandler($fields, dependentColumns));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns);
});
}
},
- check($fields, dependent_columns, $changed) {
+ check($fields, dependentColumns, $changed) {
let $element = $changed;
let column;
@@ -47,8 +48,8 @@
// A field that has many different translatable parts can also define one
// or more columns that require all columns to be translatable.
- Object.keys(dependent_columns).forEach((index) => {
- column = dependent_columns[index];
+ Object.keys(dependentColumns).forEach((index) => {
+ column = dependentColumns[index];
if (!$changed) {
$element = $fields.filter(filterFieldsList);
diff --git a/core/modules/content_translation/content_translation.admin.js b/core/modules/content_translation/content_translation.admin.js
index ddaf0d2..03ee6a2 100644
--- a/core/modules/content_translation/content_translation.admin.js
+++ b/core/modules/content_translation/content_translation.admin.js
@@ -11,24 +11,25 @@
var $context = $(context);
var options = drupalSettings.contentTranslationDependentOptions;
var $fields = void 0;
+ var dependentColumns = void 0;
- function fieldsChangeHandler($fields, dependent_columns) {
+ function fieldsChangeHandler($fields, dependentColumns) {
return function (e) {
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns, $(e.target));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns, $(e.target));
};
}
if (options && options.dependent_selectors) {
Object.keys(options.dependent_selectors).forEach(function (field) {
$fields = $context.find('input[name^="' + field + '"]');
- var dependent_columns = options.dependent_selectors[field];
+ dependentColumns = options.dependent_selectors[field];
- $fields.on('change', fieldsChangeHandler($fields, dependent_columns));
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns);
+ $fields.on('change', fieldsChangeHandler($fields, dependentColumns));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns);
});
}
},
- check: function check($fields, dependent_columns, $changed) {
+ check: function check($fields, dependentColumns, $changed) {
var $element = $changed;
var column = void 0;
@@ -36,8 +37,8 @@
return $(field).val() === column;
}
- Object.keys(dependent_columns).forEach(function (index) {
- column = dependent_columns[index];
+ Object.keys(dependentColumns).forEach(function (index) {
+ column = dependentColumns[index];
if (!$changed) {
$element = $fields.filter(filterFieldsList);
diff --git a/core/modules/editor/js/editor.es6.js b/core/modules/editor/js/editor.es6.js
index a882368..b87e914 100644
--- a/core/modules/editor/js/editor.es6.js
+++ b/core/modules/editor/js/editor.es6.js
@@ -14,10 +14,10 @@
* The text area DOM element, if it was found.
*/
function findFieldForFormatSelector($formatSelector) {
- const field_id = $formatSelector.attr('data-editor-for');
+ const fieldId = $formatSelector.attr('data-editor-for');
// This selector will only find text areas in the top-level document. We do
// not support attaching editors on text areas within iframes.
- return $(`#${field_id}`).get(0);
+ return $(`#${fieldId}`).get(0);
}
/**
diff --git a/core/modules/editor/js/editor.js b/core/modules/editor/js/editor.js
index 5ed1679..3017749 100644
--- a/core/modules/editor/js/editor.js
+++ b/core/modules/editor/js/editor.js
@@ -7,9 +7,9 @@
(function ($, Drupal, drupalSettings) {
function findFieldForFormatSelector($formatSelector) {
- var field_id = $formatSelector.attr('data-editor-for');
+ var fieldId = $formatSelector.attr('data-editor-for');
- return $('#' + field_id).get(0);
+ return $('#' + fieldId).get(0);
}
function changeTextEditor(field, newFormatID) {
diff --git a/core/modules/menu_ui/menu_ui.es6.js b/core/modules/menu_ui/menu_ui.es6.js
index f384f11..9420051 100644
--- a/core/modules/menu_ui/menu_ui.es6.js
+++ b/core/modules/menu_ui/menu_ui.es6.js
@@ -43,41 +43,41 @@
// in the form, but play nicely with user permissions and form
// alterations.
const $checkbox = $this.find('.js-form-item-menu-enabled input');
- const $link_title = $context.find('.js-form-item-menu-title input');
+ const $linkTitle = $context.find('.js-form-item-menu-title input');
const $title = $this.closest('form').find('.js-form-item-title-0-value input');
// Bail out if we do not have all required fields.
- if (!($checkbox.length && $link_title.length && $title.length)) {
+ if (!($checkbox.length && $linkTitle.length && $title.length)) {
return;
}
// If there is a link title already, mark it as overridden. The user
// expects that toggling the checkbox twice will take over the node's
// title.
- if ($checkbox.is(':checked') && $link_title.val().length) {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ if ($checkbox.is(':checked') && $linkTitle.val().length) {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
}
// Whenever the value is changed manually, disable this behavior.
- $link_title.on('keyup', () => {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ $linkTitle.on('keyup', () => {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
});
// Global trigger on checkbox (do not fill-in a value when disabled).
$checkbox.on('change', () => {
if ($checkbox.is(':checked')) {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden')) {
- $link_title.val($title.val());
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden')) {
+ $linkTitle.val($title.val());
}
}
else {
- $link_title.val('');
- $link_title.removeData('menuLinkAutomaticTitleOverridden');
+ $linkTitle.val('');
+ $linkTitle.removeData('menuLinkAutomaticTitleOverridden');
}
$checkbox.closest('.vertical-tabs-pane').trigger('summaryUpdated');
$checkbox.trigger('formUpdated');
});
// Take over any title change.
$title.on('keyup', () => {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
- $link_title.val($title.val());
- $link_title.val($title.val()).trigger('formUpdated');
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
+ $linkTitle.val($title.val());
+ $linkTitle.val($title.val()).trigger('formUpdated');
}
});
});
diff --git a/core/modules/menu_ui/menu_ui.js b/core/modules/menu_ui/menu_ui.js
index fe0feed..b251b6e 100644
--- a/core/modules/menu_ui/menu_ui.js
+++ b/core/modules/menu_ui/menu_ui.js
@@ -26,38 +26,38 @@
var $this = $(this);
var $checkbox = $this.find('.js-form-item-menu-enabled input');
- var $link_title = $context.find('.js-form-item-menu-title input');
+ var $linkTitle = $context.find('.js-form-item-menu-title input');
var $title = $this.closest('form').find('.js-form-item-title-0-value input');
- if (!($checkbox.length && $link_title.length && $title.length)) {
+ if (!($checkbox.length && $linkTitle.length && $title.length)) {
return;
}
- if ($checkbox.is(':checked') && $link_title.val().length) {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ if ($checkbox.is(':checked') && $linkTitle.val().length) {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
}
- $link_title.on('keyup', function () {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ $linkTitle.on('keyup', function () {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
});
$checkbox.on('change', function () {
if ($checkbox.is(':checked')) {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden')) {
- $link_title.val($title.val());
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden')) {
+ $linkTitle.val($title.val());
}
} else {
- $link_title.val('');
- $link_title.removeData('menuLinkAutomaticTitleOverridden');
+ $linkTitle.val('');
+ $linkTitle.removeData('menuLinkAutomaticTitleOverridden');
}
$checkbox.closest('.vertical-tabs-pane').trigger('summaryUpdated');
$checkbox.trigger('formUpdated');
});
$title.on('keyup', function () {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
- $link_title.val($title.val());
- $link_title.val($title.val()).trigger('formUpdated');
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
+ $linkTitle.val($title.val());
+ $linkTitle.val($title.val()).trigger('formUpdated');
}
});
});