Add loading screen for index
This commit is contained in:
		
							parent
							
								
									9ea7162a0c
								
							
						
					
					
						commit
						703c8bfc5b
					
				
					 3 changed files with 11 additions and 1 deletions
				
			
		|  | @ -1,6 +1,7 @@ | ||||||
| import * as Data from "./data.js"; | import * as Data from "./data.js"; | ||||||
| import * as Form from "./form.js"; | import * as Form from "./form.js"; | ||||||
| 
 | 
 | ||||||
|  | const dropdownsDiv = document.getElementById('dropdowns-div'); | ||||||
| const sportDropdown = document.getElementById('sport-dropdown'); | const sportDropdown = document.getElementById('sport-dropdown'); | ||||||
| const seasonDropdown = document.getElementById('year-dropdown'); | const seasonDropdown = document.getElementById('year-dropdown'); | ||||||
| const genderDropdown = document.getElementById('gender-dropdown'); | const genderDropdown = document.getElementById('gender-dropdown'); | ||||||
|  | @ -11,6 +12,7 @@ const gamesTableHeader = document.getElementById('games-table-header'); | ||||||
| const noScoresMessage = document.getElementById('no-scores-message'); | const noScoresMessage = document.getElementById('no-scores-message'); | ||||||
| const addScoreButton = document.getElementById('add-score-button'); | const addScoreButton = document.getElementById('add-score-button'); | ||||||
| const manageButton = document.getElementById('manage-button'); | const manageButton = document.getElementById('manage-button'); | ||||||
|  | const loadingSpan = document.getElementById('loading'); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -42,6 +44,9 @@ async function initializeForm() { | ||||||
|     divisionDropdown.onchange = loadTable; |     divisionDropdown.onchange = loadTable; | ||||||
|     teamDropdown.onchange = loadTable; |     teamDropdown.onchange = loadTable; | ||||||
| 
 | 
 | ||||||
|  |     loadingSpan.textContent = ''; | ||||||
|  |     dropdownsDiv.style.visibility = 'visible'; | ||||||
|  | 
 | ||||||
|     loadTable(); |     loadTable(); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -32,3 +32,7 @@ tr { | ||||||
| #login-button { | #login-button { | ||||||
|     margin-left: auto; |     margin-left: auto; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | #dropdowns-div { | ||||||
|  |     visibility: hidden; | ||||||
|  | } | ||||||
|  | @ -11,7 +11,8 @@ block actions | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| block content | block content | ||||||
|     div |     span#loading Loading... | ||||||
|  |     div#dropdowns-div | ||||||
|         span(class='form-section') |         span(class='form-section') | ||||||
|             label Year |             label Year | ||||||
|             span(class='form-section-input') |             span(class='form-section-input') | ||||||
|  |  | ||||||
		Reference in a new issue