dynamic categories in contribution modal dropdown
This commit is contained in:
@@ -895,11 +895,26 @@ function escapeHtml(text) {
|
||||
// Block 16: Application Startup
|
||||
// =====================================================================
|
||||
|
||||
// Initialize Category Filter in Sidebar
|
||||
// Populates Category Dropdown in Create Modal from Categories Object
|
||||
function buildCategoryDropdown() {
|
||||
var select = document.getElementById('create-category');
|
||||
for (var key in CATEGORIES) {
|
||||
var cat = CATEGORIES[key];
|
||||
var option = document.createElement('option');
|
||||
option.value = key;
|
||||
option.textContent = cat.icon + ' ' + cat.label;
|
||||
select.appendChild(option);
|
||||
}
|
||||
}
|
||||
|
||||
// Populates Category Dropdown
|
||||
buildCategoryDropdown();
|
||||
|
||||
// Initializes Category Filter in Sidebar
|
||||
buildCategoryFilter();
|
||||
|
||||
// Load Contributions from API
|
||||
// Loads Contributions from API
|
||||
loadContributions();
|
||||
|
||||
// Show Welcome Modal on first Visit
|
||||
// Shows Welcome Modal on first Visit
|
||||
checkWelcomeModal();
|
||||
Reference in New Issue
Block a user