File clean up and bug fixes
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
img {
|
img {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
max-height: 30px;
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|||||||
BIN
ProjectSourceCode/src/resources/img/club-page/cant-favorite.png
Normal file
BIN
ProjectSourceCode/src/resources/img/club-page/cant-favorite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 MiB |
@@ -1,37 +0,0 @@
|
|||||||
const league_select = document.getElementById('league_dropdown');
|
|
||||||
const team_select = document.getElementById('team_dropdown');
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
|
||||||
|
|
||||||
league_select.addEventListener('change', updateTeamSelect);
|
|
||||||
|
|
||||||
function updateTeamSelect() {
|
|
||||||
var selectedLeague = league_select.value;
|
|
||||||
|
|
||||||
team_select.innerHTML = "";
|
|
||||||
console.log(selectedLeague);
|
|
||||||
// Add options based on the selected value from the first select element
|
|
||||||
if (selectedLeague === "La Liga") {
|
|
||||||
// Add options for La Liga
|
|
||||||
console.log("Hello");
|
|
||||||
|
|
||||||
addOption(team_select, "Option 1 for LL", "option1A");
|
|
||||||
addOption(team_select, "Option 2 for LL", "option2A");
|
|
||||||
} else if (selectedLeague === "Serie A") {
|
|
||||||
// Add options for Serie A
|
|
||||||
addOption(team_select, "Team 1 in Serie A", "option1B");
|
|
||||||
addOption(team_select, "Team 2 in Serie A", "option2B");
|
|
||||||
} else if (selectedLeague === "Bundesliga") {
|
|
||||||
// Add options for Bundesliga
|
|
||||||
addOption(team_select, "Option 1 for Bun", "option1C");
|
|
||||||
addOption(team_select, "Option 2 for Bun", "option2C");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function addOption(selectElement, text, value) {
|
|
||||||
var option = document.createElement("option");
|
|
||||||
option.text = text;
|
|
||||||
option.value = value;
|
|
||||||
selectElement.add(option);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -5,14 +5,16 @@
|
|||||||
<img id="generated-page-header-logo" src="{{club.crest}}" alt="{{club.name}} Logo">
|
<img id="generated-page-header-logo" src="{{club.crest}}" alt="{{club.name}} Logo">
|
||||||
<h1 id="generated-page-header-title">{{club.name}}</h1>
|
<h1 id="generated-page-header-title">{{club.name}}</h1>
|
||||||
<img id="generated-page-header-flag" src="{{club.area.club_flag}}" alt="{{club.name}} Flag">
|
<img id="generated-page-header-flag" src="{{club.area.club_flag}}" alt="{{club.name}} Flag">
|
||||||
|
|
||||||
{{#if user}}
|
{{#if user}}
|
||||||
{{#if isFav}}
|
{{#if isFav}}
|
||||||
<img id="club-favorite-button" src="/img/club-page/favorited.png" alt="Favorite Button">
|
<img id="club-favorite-button" src="/img/club-page/favorited.png" alt="Favorite Button">
|
||||||
{{else}}
|
{{else}}
|
||||||
<img id="club-favorite-button" src="/img/club-page/unfavorited.png" alt="Favorite Button">
|
<img id="club-favorite-button" src="/img/club-page/unfavorited.png" alt="Favorite Button">
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
Please sign in
|
<img id="club-favorite-button" src="/img/club-page/cant-favorite.png" title="Please Sign In to Save a Favorite Club!">
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<!-- Hidden input fields -->
|
<!-- Hidden input fields -->
|
||||||
|
|||||||
@@ -17,28 +17,6 @@
|
|||||||
<input type="password" class="form-control" id="passwordInput" name="password" required>
|
<input type="password" class="form-control" id="passwordInput" name="password" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dropdowns" id="dropdowns-container">
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="form-label">Preferred League :</label><br>
|
|
||||||
<select id="league_dropdown">
|
|
||||||
<option>Premier League</option>
|
|
||||||
<option>La Liga</option>
|
|
||||||
<option>Bundesliga</option>
|
|
||||||
<option>Serie A</option>
|
|
||||||
<option>Ligue 1</option>
|
|
||||||
<option>Brasilerao</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- JavaScript is found at: ProjectSourceCode/src/resources/js/registration/league-and-team-select.js -->
|
|
||||||
<div>
|
|
||||||
<label class="form-label">Favorite Team :</label><br>
|
|
||||||
<select id="team_dropdown">
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
@@ -47,7 +25,5 @@
|
|||||||
<p class="mt-3">Already have an account? <a href="/login">Login</a></p>
|
<p class="mt-3">Already have an account? <a href="/login">Login</a></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src = "js/registry-page/selectFunctions.js"> </script>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,19 @@
|
|||||||
<div class="collapse navbar-collapse" id="navbarToggler">
|
<div class="collapse navbar-collapse" id="navbarToggler">
|
||||||
<ul class="navbar-nav mr-auto mt-2 mt-lg-0" id="navbar-list">
|
<ul class="navbar-nav mr-auto mt-2 mt-lg-0" id="navbar-list">
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link" href="/league/2021">Premier League</a>
|
<a class="nav-link dropdown-toggle" href="/league/2021" id="navbarDropdownPremierLeague" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
Premier League
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownPremierLeague">
|
||||||
|
<!-- Dropdown menu items here -->
|
||||||
|
<a class="dropdown-item" href="/league/2021">Premier League</a>
|
||||||
|
<!-- Add more dropdown items if needed -->
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/league/2002">Bundesliga</a>
|
<a class="nav-link" href="/league/2002">Bundesliga</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user