Skip to content

Commit

Permalink
Make button on games page resuable
Browse files Browse the repository at this point in the history
  • Loading branch information
ALEEF02 committed Nov 4, 2022
1 parent b95519f commit b50d92a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MavenBack/src/main/webapp/games.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
ajaxRequest.send(postData);
ajaxRequest.onreadystatechange = function(){
if (ajaxRequest.readyState == 4) {
document.getElementById("submitButton").disabled = false;
if (ajaxRequest.status == 200) {
// Successfully created the game
gamesTable.childNodes[5].innerHTML = "";
Expand All @@ -143,7 +144,6 @@
console.warn(JSON.parse(ajaxRequest.responseText).error);
var errorText = document.getElementById('errorMessage');
errorText.innerHTML = "Error: " + JSON.parse(ajaxRequest.responseText).error;
document.getElementById("submitButton").disabled = false;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions MavenBack/src/main/webapp/gamesStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ input[type=text], input[type=number]{
color: #8c463d;
}

#submitButton:disabled {
background-color: #57403d;
}

@media (max-width: 800px) {
.pendingGames, .recent{
float:none;
Expand Down

0 comments on commit b50d92a

Please sign in to comment.