Skip to content

Commit

Permalink
Fixup. Format code with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Sep 21, 2023
1 parent 84406de commit 9a2c214
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 9 additions & 3 deletions pod/completion/static/js/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,15 @@ var sendandgetform = async function (elt, action, name, form, list) {
document.getElementById(form).innerHTML =
'<div style="width:100%; margin: 2rem;"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></div>';

document.querySelectorAll(`#card-completion-tips div:not(#${name}-info) .collapse`).forEach((collapsable) => {
bootstrap.Collapse.getOrCreateInstance(collapsable, { toggle: false }).hide();
});
document
.querySelectorAll(
`#card-completion-tips div:not(#${name}-info) .collapse`,
)
.forEach((collapsable) => {
bootstrap.Collapse.getOrCreateInstance(collapsable, {
toggle: false,
}).hide();
});
/* Display associated help in side menu */
var compInfo = document.querySelector(`#${name}-info>.collapse`);
bootstrap.Collapse.getOrCreateInstance(compInfo).show();
Expand Down
12 changes: 7 additions & 5 deletions pod/video/static/js/ajax-display-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ function getThemesForSpecificChannel(channelSlug) {
*/
function setModalTitle(modalContentElement, channelsCount) {
const modalTitleElement = modalContentElement.querySelector(".modal-title");
const channelIcon = "<i class=\"bi bi-play-btn\" aria-hidden=\"true\"></i>";
const channelIcon = '<i class="bi bi-play-btn" aria-hidden="true"></i>';
var channelString = ngettext(
`%(count)s channel`,
`%(count)s channels`,
channelsCount);
channelString = interpolate(channelString, {count: channelsCount}, true);
channelsCount,
);
channelString = interpolate(channelString, { count: channelsCount }, true);
modalTitleElement.innerHTML = `${channelIcon}&nbsp;${channelString}`;
}

Expand Down Expand Up @@ -180,8 +181,9 @@ function convertToModalListElement(channel) {
var videoString = ngettext(
`%(count)s video`,
`%(count)s videos`,
channel.videoCount);
videoString = interpolate(videoString, {count: channel.videoCount}, true);
channel.videoCount,
);
videoString = interpolate(videoString, { count: channel.videoCount }, true);
noWrapSpanElement.innerHTML += `<span class="badge text-bg-primary rounded-pill">${videoString}</span>`;

const childAndParentCouples = [
Expand Down

0 comments on commit 9a2c214

Please sign in to comment.