summaryrefslogtreecommitdiffstats
path: root/core/modules/menu_ui/menu_ui.es6.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/menu_ui/menu_ui.es6.js')
-rw-r--r--core/modules/menu_ui/menu_ui.es6.js26
1 files changed, 13 insertions, 13 deletions
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');
}
});
});