Issue #3091672 by alexpott: Fix javascript coding standards
(cherry picked from commit 0a69c9c580
)
merge-requests/64/head
parent
0712474d54
commit
98e3cac2a9
|
@ -231,9 +231,7 @@
|
|||
* A string representing a DOM fragment.
|
||||
*/
|
||||
dropbuttonToggle(options) {
|
||||
return `<li class="dropbutton-toggle"><button type="button"><span class="dropbutton-arrow"><span class="visually-hidden">${
|
||||
options.title
|
||||
}</span></span></button></li>`;
|
||||
return `<li class="dropbutton-toggle"><button type="button"><span class="dropbutton-arrow"><span class="visually-hidden">${options.title}</span></span></button></li>`;
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
|
@ -56,11 +56,10 @@
|
|||
|
||||
// Attach summary for configurable filters (only for screen readers).
|
||||
if (filterSettingsTab) {
|
||||
filterSettingsTab.details.drupalSetSummary(
|
||||
() =>
|
||||
$checkbox.is(':checked')
|
||||
? Drupal.t('Enabled')
|
||||
: Drupal.t('Disabled'),
|
||||
filterSettingsTab.details.drupalSetSummary(() =>
|
||||
$checkbox.is(':checked')
|
||||
? Drupal.t('Enabled')
|
||||
: Drupal.t('Disabled'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,7 @@
|
|||
*/
|
||||
Drupal.theme.quickeditEntityToolbar = function(settings) {
|
||||
let html = '';
|
||||
html += `<div id="${
|
||||
settings.id
|
||||
}" class="quickedit quickedit-toolbar-container clearfix">`;
|
||||
html += `<div id="${settings.id}" class="quickedit quickedit-toolbar-container clearfix">`;
|
||||
html += '<i class="quickedit-toolbar-pointer"></i>';
|
||||
html += '<div class="quickedit-toolbar-content">';
|
||||
html +=
|
||||
|
|
|
@ -38,9 +38,8 @@
|
|||
*/
|
||||
function dateFormatHandler(e) {
|
||||
const baseValue = $(e.target).val() || '';
|
||||
const dateString = baseValue.replace(
|
||||
/\\?(.?)/gi,
|
||||
(key, value) => (dateFormats[key] ? dateFormats[key] : value),
|
||||
const dateString = baseValue.replace(/\\?(.?)/gi, (key, value) =>
|
||||
dateFormats[key] ? dateFormats[key] : value,
|
||||
);
|
||||
|
||||
$preview.text(dateString);
|
||||
|
|
|
@ -197,8 +197,6 @@
|
|||
* A string representing a DOM fragment.
|
||||
*/
|
||||
Drupal.theme.toolbarMenuItemToggle = function(options) {
|
||||
return `<button class="${options.class}"><span class="action">${
|
||||
options.action
|
||||
}</span> <span class="label">${options.text}</span></button>`;
|
||||
return `<button class="${options.class}"><span class="action">${options.action}</span> <span class="label">${options.text}</span></button>`;
|
||||
};
|
||||
})(jQuery, Drupal, drupalSettings);
|
||||
|
|
|
@ -47,9 +47,7 @@
|
|||
|
||||
// If the password strength indicator is enabled, add its markup.
|
||||
if (settings.password.showStrengthIndicator) {
|
||||
const passwordMeter = `<div class="password-strength"><div class="password-strength__meter"><div class="password-strength__indicator js-password-strength__indicator"></div></div><div aria-live="polite" aria-atomic="true" class="password-strength__title">${
|
||||
translate.strengthTitle
|
||||
} <span class="password-strength__text js-password-strength__text"></span></div></div>`;
|
||||
const passwordMeter = `<div class="password-strength"><div class="password-strength__meter"><div class="password-strength__indicator js-password-strength__indicator"></div></div><div aria-live="polite" aria-atomic="true" class="password-strength__title">${translate.strengthTitle} <span class="password-strength__text js-password-strength__text"></span></div></div>`;
|
||||
$confirmInput
|
||||
.parent()
|
||||
.after('<div class="password-suggestions description"></div>');
|
||||
|
|
|
@ -11,7 +11,5 @@
|
|||
* A string representing a DOM fragment.
|
||||
*/
|
||||
Drupal.theme.passwordConfirmMessage = translate =>
|
||||
`<div aria-live="polite" aria-atomic="true" class="password-confirm-message js-password-confirm-message">${
|
||||
translate.confirmTitle
|
||||
} <span></span></div>`;
|
||||
`<div aria-live="polite" aria-atomic="true" class="password-confirm-message js-password-confirm-message">${translate.confirmTitle} <span></span></div>`;
|
||||
})(Drupal);
|
||||
|
|
|
@ -11,7 +11,5 @@
|
|||
* A string representing a DOM fragment.
|
||||
*/
|
||||
Drupal.theme.passwordConfirmMessage = translate =>
|
||||
`<div aria-live="polite" aria-atomic="true" class="password-confirm js-password-confirm js-password-confirm-message">${
|
||||
translate.confirmTitle
|
||||
} <span></span></div>`;
|
||||
`<div aria-live="polite" aria-atomic="true" class="password-confirm js-password-confirm js-password-confirm-message">${translate.confirmTitle} <span></span></div>`;
|
||||
})(Drupal);
|
||||
|
|
Loading…
Reference in New Issue