Skip to content

Commit

Permalink
Remove some curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Feb 9, 2024
1 parent 419fb4b commit 7ece318
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ Joomla.submitbutton = (task) => {
if (task === 'actionlogs.exportSelectedLogs') {
// Get id of selected action logs item and pass it to export form hidden input
const cids = [];
const elements = document.querySelectorAll("input[name='cid[]']:checked");

if (elements.length) {
elements.forEach((element) => {
cids.push(element.value);
});
}
document.querySelectorAll("input[name='cid[]']:checked").forEach((element) => cids.push(element.value));

document.exportForm.cids.value = cids.join(',');
Joomla.submitform(task, document.getElementById('exportForm'));
Expand Down
8 changes: 3 additions & 5 deletions build/media_source/com_cache/js/admin-cache-default.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ Joomla = window.Joomla || {};
'use strict';

document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.cache-entry').forEach((el) => {
el.addEventListener('click', ({ currentTarget }) => {
Joomla.isChecked(currentTarget.checked);
});
});
document.querySelectorAll('.cache-entry').forEach((el) =>
el.addEventListener('click', ({ currentTarget }) => Joomla.isChecked(currentTarget.checked));
);
});
})(document, Joomla);
8 changes: 3 additions & 5 deletions build/media_source/com_content/js/articles-status.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
'use strict';

document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.article-status').forEach((element) => {
element.addEventListener('click', (event) => {
event.stopPropagation();
});
});
document.querySelectorAll('.article-status').forEach((element) =>
element.addEventListener('click', (event) => event.stopPropagation());
);
});
})();
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
};

const onBoot = () => {
document.querySelectorAll('.original').forEach((fragment) => {
compare(fragment, fragment.nextElementSibling);
});
document.querySelectorAll('.original').forEach((fragment) => compare(fragment, fragment.nextElementSibling));

// Cleanup
document.removeEventListener('DOMContentLoaded', onBoot);
Expand Down
8 changes: 3 additions & 5 deletions build/media_source/com_cpanel/js/admin-cpanel-default.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const debounce = (callback, time = 250, interval) => (...args) => clearTimeout(i
const onBoot = () => {
const cpanelModules = document.getElementById('content');
if (cpanelModules) {
cpanelModules.querySelectorAll('.unpublish-module').forEach((link) => {
cpanelModules.querySelectorAll('.unpublish-module').forEach((link) =>
link.addEventListener('click', ({ target }) => Joomla.unpublishModule(target));
});
);
}

// Cleanup
Expand Down Expand Up @@ -78,9 +78,7 @@ const debounce = (callback, time = 250, interval) => (...args) => clearTimeout(i
resizeAllGridItems() {
const $gridCells = [].slice.call(this.$gridBox.children);

$gridCells.forEach(($cell) => {
this.resizeGridItem($cell, this.gridAutoRows, this.gridRowGap);
});
$gridCells.forEach(($cell) => this.resizeGridItem($cell, this.gridAutoRows, this.gridRowGap));
},

initialise() {
Expand Down
4 changes: 1 addition & 3 deletions build/media_source/com_finder/js/finder-edit.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ Joomla = window.Joomla || {};
document.addEventListener('DOMContentLoaded', () => {
// Handle toggle all
document.querySelectorAll('.filter-toggle-all').forEach((button) => {
button.addEventListener('click', () => {
document.querySelectorAll('.filter-node').forEach((node) => node.click());
});
button.addEventListener('click', () => document.querySelectorAll('.filter-node').forEach((node) => node.click()));
});

// Update the count
Expand Down

0 comments on commit 7ece318

Please sign in to comment.