summaryrefslogtreecommitdiffstats
path: root/core/modules/content_translation
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/content_translation')
-rw-r--r--core/modules/content_translation/content_translation.admin.es6.js17
-rw-r--r--core/modules/content_translation/content_translation.admin.js17
2 files changed, 18 insertions, 16 deletions
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);