WIP: Switch between FS storage and S3 per static asset #104417
@ -1864,15 +1864,25 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: decouple js collapse from Bootstrap bundle
|
||||||
triggerArray.forEach(elem => {
|
triggerArray.forEach(elem => {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
|
const characterCount = elem.textContent.length;
|
||||||
|
|
||||||
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
||||||
|
|
||||||
elem.textContent = 'Hide';
|
// Check if btn text is 'Show' or 'Hide'
|
||||||
|
if (characterCount == 4) {
|
||||||
|
elem.textContent = 'Hide';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
const characterCount = elem.textContent.length;
|
||||||
|
|
||||||
elem.classList.add(CLASS_NAME_COLLAPSED);
|
elem.classList.add(CLASS_NAME_COLLAPSED);
|
||||||
|
|
||||||
elem.textContent = 'Show';
|
if (characterCount == 4) {
|
||||||
|
elem.textContent = 'Show';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elem.setAttribute('aria-expanded', isOpen);
|
elem.setAttribute('aria-expanded', isOpen);
|
||||||
|
Loading…
Reference in New Issue
Block a user