You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
957 B
33 lines
957 B
import { Popover } from "bootstrap";
|
|
|
|
export function initializeListenersForNavDropdowns() {
|
|
const schoolDropdown = document.querySelector("#select-school");
|
|
if (schoolDropdown) {
|
|
document
|
|
.querySelector("#select-school")
|
|
.addEventListener("change", (event) => {
|
|
window.location = event.target.value;
|
|
});
|
|
|
|
document
|
|
.querySelector("#select-district")
|
|
.addEventListener("change", (event) => {
|
|
window.location = event.target.value;
|
|
});
|
|
}
|
|
const academicYearDropdown = document.querySelector("#select-academic-year");
|
|
if (academicYearDropdown) {
|
|
academicYearDropdown.addEventListener("change", (event) => {
|
|
window.location = event.target.value;
|
|
});
|
|
}
|
|
}
|
|
|
|
export function initializePopovers() {
|
|
document
|
|
.querySelectorAll('[data-bs-toggle="popover"]')
|
|
.forEach((popoverElement) => {
|
|
new Popover(popoverElement, { trigger: "hover focus", html: true });
|
|
});
|
|
}
|