Skip to content

Commit

Permalink
Display:none instead of visibility:hidden for table headings to ensur…
Browse files Browse the repository at this point in the history
…e clean generation of footer
  • Loading branch information
jro committed Feb 13, 2021
1 parent 3cbe355 commit a83a5c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h3 id="playersPlayedAgainstHeading">Played against count</h3>
<div class="container text-center">
<div class="row">
<div class="offset-md-4 col-md-4">
<span class="text-muted text-center"><a href="https://github.com/Roggstars/tennisPlanner/releases">v0.3.0</a></span>
<span class="text-muted text-center"><a href="https://github.com/Roggstars/tennisPlanner/releases">v0.3.3</a></span>
</div>
<div class="col-md-4">
<span class="text-muted"><a href="https://github.com/Roggstars/tennisPlanner/blob/master/LICENSE">Copyright © 2020 Julian Roggendorf</a></span>
Expand Down
10 changes: 5 additions & 5 deletions js/generateMatchPlan.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ function generateMatchPlan() {
cell.appendChild(text);
}

document.getElementById("matchListTableHeading").style.visibility = "visible";
document.getElementById("playersPlayedMatchesHeading").style.visibility = "visible";
document.getElementById("playersPlayedTogetherHeading").style.visibility = "visible";
document.getElementById("playersPlayedAgainstHeading").style.visibility = "visible";
document.getElementById("matchListTableHeading").style.display = "";
document.getElementById("playersPlayedMatchesHeading").style.display = "";
document.getElementById("playersPlayedTogetherHeading").style.display = "";
document.getElementById("playersPlayedAgainstHeading").style.display = "";

// Setup subCountTable
if (subCount > 0) {
document.getElementById("subCountHeading").style.visibility = "visible";
document.getElementById("subCountHeading").style.display = "";
let subCountTable = document.getElementById("subCountTable");
row = subCountTable.insertRow(0);
cell = row.insertCell(0);
Expand Down
22 changes: 11 additions & 11 deletions js/playerListManipulation.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
document.getElementById("matchListTableHeading").style.visibility = "hidden";
document.getElementById("playersPlayedMatchesHeading").style.visibility = "hidden";
document.getElementById("playersPlayedTogetherHeading").style.visibility = "hidden";
document.getElementById("playersPlayedAgainstHeading").style.visibility = "hidden";
document.getElementById("subCountHeading").style.visibility = "hidden";
document.getElementById("matchListTableHeading").style.display = "none";
document.getElementById("playersPlayedMatchesHeading").style.display = "none";
document.getElementById("playersPlayedTogetherHeading").style.display = "none";
document.getElementById("playersPlayedAgainstHeading").style.display = "none";
document.getElementById("subCountHeading").style.display = "none";

function addItem() {
// This function adds an item to the playerList.
Expand All @@ -25,14 +25,14 @@ function removeItem() {
function clearList() {
document.getElementById("playerList").innerHTML = "";
removeOldTables();
document.getElementById("matchListTableHeading").style.visibility = "hidden";
document.getElementById("playersPlayedMatchesHeading").style.visibility = "hidden";
document.getElementById("playersPlayedTogetherHeading").style.visibility = "hidden";
document.getElementById("playersPlayedAgainstHeading").style.visibility = "hidden";
document.getElementById("subCountHeading").style.visibility = "hidden";
document.getElementById("matchListTableHeading").style.display = "none";
document.getElementById("playersPlayedMatchesHeading").style.display = "none";
document.getElementById("playersPlayedTogetherHeading").style.display = "none";
document.getElementById("playersPlayedAgainstHeading").style.display = "none";
document.getElementById("subCountHeading").style.display = "none";
}
function addItemEnter(e) {
if (e.key === "Enter") {
addItem();
}
}
}

0 comments on commit a83a5c9

Please sign in to comment.