Skip to content

Commit

Permalink
fix removal of data-group-title elements
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Jan 25, 2025
1 parent f462059 commit 14fcead
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/js/extending.js
Original file line number Diff line number Diff line change
Expand Up @@ -2246,10 +2246,12 @@ const diocesanCalendarDioceseNameChanged = (ev) => {
form.reset();
form.querySelectorAll('.row').forEach((row, idx) => {
if (idx >= 3) {
if (row.previousElementSibling && row.previousElementSibling.querySelector('.data-group-title')) {
row.previousElementSibling.remove();
}
row.remove();
}
});
form.querySelectorAll('.data-group-title').forEach(el => el.remove());
form.querySelectorAll('.litEventCommon').forEach(el => $(el).multiselect('deselectAll', false).multiselect('select', 'Proper'));
form.querySelectorAll('.litEventColor').forEach(el => $(el).multiselect('deselectAll', false).multiselect('select', 'white'));
form.querySelectorAll('.litEventName').forEach(el => el.setAttribute('data-valuewas', ''));
Expand Down Expand Up @@ -2280,9 +2282,7 @@ const diocesanCalendarDioceseNameChanged = (ev) => {

// Set the list of locales for the current selected diocese
document.querySelector('#diocesanCalendarLocales').value = diocesan_calendar.locales;
const LocalesForDiocese = Object.entries(AvailableLocalesWithRegion).filter(([localeIso, ]) => {
return diocesan_calendar.locales.includes(localeIso);
});
const LocalesForDiocese = Object.entries(AvailableLocalesWithRegion).filter(([localeIso, ]) => diocesan_calendar.locales.includes(localeIso));
document.querySelector('#currentLocalization').innerHTML = LocalesForDiocese.map(item => `<option value="${item[0]}">${item[1]}</option>`).join('');
$('#diocesanCalendarLocales').multiselect('deselectAll', false).multiselect('select', diocesan_calendar.locales);

Expand Down

0 comments on commit 14fcead

Please sign in to comment.