hiding load more button when hydrating wit all publications
This commit is contained in:
parent
867a565e5a
commit
c1fc8156bc
|
|
@ -107,12 +107,19 @@ async function filterPublications(publicationType, e) {
|
|||
const sectionWebinaires = document.querySelector('.videos-webinaires-archives');
|
||||
const sectionHighlight = document.querySelector('#highlighted-document');
|
||||
|
||||
let loadMoreBrochuresButton = sectionBrochures.querySelector('.cta--load-more');
|
||||
let loadMoreFichesInfosButton = sectionFichesInfos.querySelector('.cta--load-more');
|
||||
|
||||
sectionFichesInfos.removeAttribute('hidden');
|
||||
sectionWebinaires.removeAttribute('hidden');
|
||||
sectionBrochures.removeAttribute('hidden');
|
||||
sectionHighlight.removeAttribute('hidden');
|
||||
|
||||
switch (publicationType) {
|
||||
case 'all':
|
||||
loadMoreBrochuresButton.setAttribute('hidden', true);
|
||||
loadMoreFichesInfosButton.setAttribute('hidden', true);
|
||||
|
||||
sectionBrochures.setAttribute('isLoading', true);
|
||||
sectionFichesInfos.setAttribute('isLoading', true);
|
||||
sectionHighlight.setAttribute('isLoading', true);
|
||||
|
|
@ -127,6 +134,8 @@ async function filterPublications(publicationType, e) {
|
|||
sectionWebinaires.setAttribute('hidden', true);
|
||||
sectionHighlight.setAttribute('hidden', true);
|
||||
|
||||
loadMoreBrochuresButton.setAttribute('hidden', true);
|
||||
|
||||
sectionBrochures.setAttribute('isLoading', true);
|
||||
await hydrateBrochureArchiveGrid();
|
||||
sectionBrochures.removeAttribute('isLoading');
|
||||
|
|
@ -137,6 +146,8 @@ async function filterPublications(publicationType, e) {
|
|||
sectionWebinaires.setAttribute('hidden', true);
|
||||
sectionHighlight.setAttribute('hidden', true);
|
||||
|
||||
loadMoreFichesInfosButton.setAttribute('hidden', true);
|
||||
|
||||
sectionFichesInfos.setAttribute('isLoading', true);
|
||||
await hydrateFicheInfoArchiveGrid();
|
||||
sectionFichesInfos.removeAttribute('isLoading');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user