* Initial setup work with error * Dropdown working with error fixed * Removed repition * Home page billboard dropdowns added * Created common file for dropdown * Complete display ad dropdown usage * Minor indentation fix * Minor UI updates * Minor test update * Dropdown for billboard optimisation * Added anchor tags * Display ad unified code * Design changes * Design changes * Changes to display ad click tracking * Style changes * Design change to admin display ad * Nit fix * Nit fix * Updated test
18 lines
798 B
JavaScript
18 lines
798 B
JavaScript
import { initializeDropdown } from './dropdownUtils';
|
|
|
|
export function setupDisplayAdDropdown(){
|
|
const sponsorshipDropdownButtons = document.querySelectorAll('button[id^=sponsorship-dropdown-trigger-]');
|
|
if (sponsorshipDropdownButtons.length) {
|
|
sponsorshipDropdownButtons.forEach((sponsorshipDropdownButton) => {
|
|
const dropdownContentId = sponsorshipDropdownButton.getAttribute('aria-controls');
|
|
if (sponsorshipDropdownButton && sponsorshipDropdownButton.dataset.initialized !== 'true') {
|
|
initializeDropdown({
|
|
triggerElementId: sponsorshipDropdownButton.id,
|
|
dropdownContentId
|
|
});
|
|
|
|
sponsorshipDropdownButton.dataset.initialized = 'true';
|
|
}
|
|
})
|
|
}
|
|
}
|