Add loading message to manage page

main
sudoer777 2022-03-09 10:20:53 -07:00
parent 7ec36ed7f2
commit 42ac77ec6f
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import * as Data from "./data.js";
const categoryDropdown = document.getElementById('category-dropdown');
const itemsListTable = document.getElementById('items-list');
const addNewButton = document.getElementById('add-new-button');
const loadingSpan = document.getElementById('loading-message');
function getGenderLetter(genderName) {
@ -362,6 +363,8 @@ CATEGORIES.push(new Category(
async function listItems(category) {
loadingSpan.textContent = "Loading...";
itemsListTable.innerHTML = "";
const itemsList = await category.getItems();
@ -389,6 +392,8 @@ async function listItems(category) {
itemsListTable.appendChild(row);
});
loadingSpan.textContent = '';
}
if(window.location.hash) {
let correctIndex;

View File

@ -18,6 +18,7 @@ block content
option(value="accounts") Accounts
div
h2#table-header
span#loading-message Loading...
table#items-list
button#add-new-button Add new...