Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable video switcher buttons when match play buttons are disabled #186

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions static/js/match_play.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ const handleArenaStatus = function(data) {
case "PAUSE_PERIOD":
case "TELEOP_PERIOD":
$("#showOverlay").prop("disabled", true);
$("#introRadio").prop("disabled", true);
$("#showFinalScore").prop("disabled", true);
$("#scoreRadio").prop("disabled", true);
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", false);
$("#signalReset").prop("disabled", true);
Expand All @@ -208,7 +210,9 @@ const handleArenaStatus = function(data) {
break;
case "POST_MATCH":
$("#showOverlay").prop("disabled", true);
$("#introRadio").prop("disabled", true);
$("#showFinalScore").prop("disabled", true);
$("#scoreRadio").prop("disabled", true);
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", true);
$("#signalReset").prop("disabled", false);
Expand All @@ -220,7 +224,9 @@ const handleArenaStatus = function(data) {
break;
case "TIMEOUT_ACTIVE":
$("#showOverlay").prop("disabled", true);
$("#introRadio").prop("disabled", true);
$("#showFinalScore").prop("disabled", true);
$("#scoreRadio").prop("disabled", true);
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", false);
$("#signalReset").prop("disabled", true);
Expand All @@ -232,7 +238,9 @@ const handleArenaStatus = function(data) {
break;
case "POST_TIMEOUT":
$("#showOverlay").prop("disabled", true);
$("#introRadio").prop("disabled", true);
$("#showFinalScore").prop("disabled", true);
$("#scoreRadio").prop("disabled", true);
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", true);
$("#signalReset").prop("disabled", true);
Expand Down Expand Up @@ -278,6 +286,7 @@ const handleMatchLoad = function(data) {

$("#substituteTeams").prop("disabled", true);
$("#showOverlay").prop("disabled", false);
$("#introRadio").prop("disabled", false);
}

// Handles a websocket message to update the match time countdown.
Expand All @@ -299,6 +308,7 @@ const handleScorePosted = function(data) {
let matchName = data.Match.LongName;
if (matchName) {
$("#showFinalScore").prop("disabled", false);
$("#scoreRadio").prop("disabled", false);
} else {
matchName = "None"
}
Expand Down
6 changes: 4 additions & 2 deletions templates/match_play.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ <h6>Audience Display</h6>
</div>
<div>
<label>
<input type="radio" name="audienceDisplay" value="intro" onclick="setAudienceDisplay();"> Match Intro
<input type="radio" name="audienceDisplay" value="intro"
onclick="setAudienceDisplay();" id="introRadio"> Match Intro
</label>
</div>
<div>
Expand All @@ -123,7 +124,8 @@ <h6>Audience Display</h6>
</div>
<div>
<label>
<input type="radio" name="audienceDisplay" value="score" onclick="setAudienceDisplay();"> Final Score
<input type="radio" name="audienceDisplay" value="score"
onclick="setAudienceDisplay();" id="scoreRadio"> Final Score
</label>
</div>
<div>
Expand Down
Loading