Unverified Commit 4ddf8b84 authored by alexpott's avatar alexpott
Browse files

Issue #2983355 by ApacheEx, drpal: JS codestyle: indent

parent 3a04b3c1
......@@ -7,7 +7,6 @@
"new-cap": "off",
"max-len": "off",
"default-case": "off",
"indent": "off",
"prefer-destructuring": "off",
"object-curly-newline": "off",
"operator-linebreak": "off",
......
......@@ -157,7 +157,7 @@
const $fieldList = $(form).find('[name]').map((index, element) =>
// We use id to avoid name duplicates on radio fields and filter out
// elements with a name but no id.
element.getAttribute('id'));
element.getAttribute('id'));
// Return a true array.
return $.makeArray($fieldList);
}
......
......@@ -206,7 +206,7 @@
return states.Dependent.comparisons[reference.constructor.name](reference, value);
}
// Do a plain comparison otherwise.
// Do a plain comparison otherwise.
return compare(reference, value);
},
......@@ -348,7 +348,7 @@
return invert(this.compare(value, selector, state), state.invert);
}
// Resolve this constraint as an AND/OR operator.
// Resolve this constraint as an AND/OR operator.
return this.verifyConstraints(value, selector);
},
......
......@@ -142,7 +142,7 @@
// absolute minimum available weight. This way we always have an
// unused upper and lower bound, which makes manually setting the
// weights easier for users who prefer to do it that way.
++weight);
++weight);
}
const table = $('#blocks');
......
......@@ -157,8 +157,8 @@
return true;
}
// Remove this placeholder link from the DOM because we won't need
// it.
// Remove this placeholder link from the DOM because we won't need
// it.
remove($placeholder);
return false;
});
......
......@@ -532,23 +532,23 @@
}
// Otherwise, it is still possible that this feature is allowed.
// Every tag must be explicitly allowed if there are filter rules
// doing tag whitelisting.
// Every tag must be explicitly allowed if there are filter rules
// doing tag whitelisting.
if (!_.every(_.pluck(universe, 'tag'))) {
return false;
}
// Every tag was explicitly allowed, but since the universe is not
// empty, one or more tag properties are disallowed. However, if
// only blacklisting of tag properties was applied to these tags,
// and no whitelisting was ever applied, then it's still fine:
// since none of the tag properties were blacklisted, we got to
// this point, and since no whitelisting was applied, it doesn't
// matter that the properties: this could never have happened
// anyway. It's only this late that we can know this for certain.
// Every tag was explicitly allowed, but since the universe is not
// empty, one or more tag properties are disallowed. However, if
// only blacklisting of tag properties was applied to these tags,
// and no whitelisting was ever applied, then it's still fine:
// since none of the tag properties were blacklisted, we got to
// this point, and since no whitelisting was applied, it doesn't
// matter that the properties: this could never have happened
// anyway. It's only this late that we can know this for certain.
const tags = _.keys(universe);
// Figure out if there was any rule applying whitelisting tag
// restrictions to each of the remaining tags.
// Figure out if there was any rule applying whitelisting tag
// restrictions to each of the remaining tags.
for (let i = 0; i < tags.length; i++) {
const tag = tags[i];
if (_.has(universe, tag)) {
......
......@@ -283,7 +283,7 @@
.removeClass('upload error hover loading')
.addClass(`.quickedit-image-dropzone ${state}`)
.children('.quickedit-image-text')
.html(text);
.html(text);
}
else {
$dropzone = $(Drupal.theme('quickeditImageDropzone', {
......
......@@ -31,8 +31,8 @@
ui.item.data('layout-block-uuid'),
ui.item.prev('[data-layout-block-uuid]').data('layout-block-uuid'),
]
.filter(element => element !== undefined)
.join('/'),
.filter(element => element !== undefined)
.join('/'),
}).execute();
}
},
......
......@@ -88,7 +88,7 @@
Drupal.theme.nodePreviewModal = function () {
return `<p>${
Drupal.t('Leaving the preview will cause unsaved changes to be lost. Are you sure you want to leave the preview?')
}</p><small class="description">${
}</p><small class="description">${
Drupal.t('CTRL+Left click will prevent this dialog from showing and proceed to the clicked link.')}</small>`;
};
}(jQuery, Drupal));
......@@ -1000,7 +1000,7 @@
const $checkboxes = $selectAll.closest('.form-checkboxes').find('.js-form-type-checkbox:not(.js-form-item-options-value-all) input[type="checkbox"]');
if ($selectAll.length) {
// Show the select all checkbox.
// Show the select all checkbox.
$selectAll.show();
$selectAllCheckbox.on('click', function () {
// Update all checkbox beside the select all checkbox.
......
......@@ -3,15 +3,15 @@
* This file is used to add any javascript that is needed for the main menu.
*/
(function () {
const toggler = document.querySelector('[data-drupal-selector="menu-main-toggle"]');
const menu = document.querySelector('[data-drupal-selector="menu-main"]');
(function () {
const toggler = document.querySelector('[data-drupal-selector="menu-main-toggle"]');
const menu = document.querySelector('[data-drupal-selector="menu-main"]');
function toggleMenu() {
toggler.classList.toggle('menu-main-toggle--active');
menu.classList.toggle('menu-main--active');
return false;
}
function toggleMenu() {
toggler.classList.toggle('menu-main-toggle--active');
menu.classList.toggle('menu-main--active');
return false;
}
toggler.addEventListener('click', toggleMenu);
}());
toggler.addEventListener('click', toggleMenu);
}());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment