Initial commit

This commit is contained in:
Nathan Schneider
2025-03-23 21:44:39 -06:00
commit 521c782c42
56 changed files with 8295 additions and 0 deletions

25
static/js/fix-dropdown.js Normal file
View File

@ -0,0 +1,25 @@
// Make sure the dropdown works correctly
document.addEventListener('DOMContentLoaded', function() {
const exportBtn = document.getElementById('export-btn');
const dropdownMenu = document.querySelector('.dropdown-menu');
if (exportBtn && dropdownMenu) {
// Force clear any previous event listeners
const newExportBtn = exportBtn.cloneNode(true);
exportBtn.parentNode.replaceChild(newExportBtn, exportBtn);
// Add event listener to the new button
newExportBtn.addEventListener('click', function(e) {
e.preventDefault();
e.stopPropagation();
dropdownMenu.style.display = dropdownMenu.style.display === 'block' ? 'none' : 'block';
});
// Close dropdown when clicking elsewhere
document.addEventListener('click', function(e) {
if (newExportBtn && \!newExportBtn.contains(e.target) && dropdownMenu && \!dropdownMenu.contains(e.target)) {
dropdownMenu.style.display = 'none';
}
});
}
});