Skip to content

Commit

Permalink
Merge pull request #22 from frank-weinberg/dev
Browse files Browse the repository at this point in the history
Improve Timeout and Clock handling:
  • Loading branch information
jaredquinn authored Feb 13, 2018
2 parents 0c73fb4 + d57abeb commit 01a1eb8
Show file tree
Hide file tree
Showing 26 changed files with 202 additions and 79 deletions.
2 changes: 1 addition & 1 deletion html/controls/mobile.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h1>Jam Control</h1>
<button class="StartJam" data-role="button" data-icon="check" data-iconpos="right">Start Jam</button>
</div>
<div class="ui-block-b">
<button class="StopJam" data-role="button" data-icon="delete" data-iconpos="left">Stop Jam</button>
<button class="StopJam" data-role="button" data-icon="delete" data-iconpos="left">Stop Jam/TO</button>
</div>
</div>
<button class="Timeout" data-role="button">Timeout</button>
Expand Down
2 changes: 2 additions & 0 deletions html/controls/operator.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ table.RowTable { border-spacing: 0px; }
#TeamTime table.Team tr.Score td.Score a { font-size: 300%; }
#TeamTime table.Team tr.Score td a.Change { font-size: 200%; line-height: 175%; }
#TeamTime table.Team tr.Score td a.JamScore { font-size: 200%; line-height: 175%; }
#TeamTime table.Team tr.Timeout td.Timeout button.Active { color: #000; background: #3f3; }
#TeamTime table.Team tr.Timeout td.Timeouts a { font-size: 200%; }
#TeamTime table.Team tr.Timeout td.OfficialReview button.Active { color: #000; background: #3f3; }
#TeamTime table.Team tr.Timeout td.OfficialReviews a { font-size: 200%; }
#TeamTime table.Team tr.Timeout td.RetainedOfficialReview button.Active { color: #000; background: #F33; }
#TeamTime table.Team tr.Jammer td.ui-buttonset label.Lead.ui-state-active { background: #3f3; }
Expand Down
54 changes: 35 additions & 19 deletions html/controls/operator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions html/views/overlays/ddtv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,10 @@ function clockType(k,v) {

if(tc) {
ret = WS.state["ScoreBoard.Clock(Timeout).Name"];
if(to != "" && or) { ret = 'Official Review'; }
if(to != "" && !or) { ret = 'Team Timeout'; }
if(to == "" && !or) { ret = 'Official Timeout'; }
if(to != "" && to != "O" && or) { ret = 'Official Review'; }
if(to != "" && to != "O" && !or) { ret = 'Team Timeout'; }
if(to == "O") { ret = 'Official Timeout'; }
if(to == "") { ret = 'Timeout'; }
showDesc = true;
} else if(lc) {
ret = WS.state["ScoreBoard.Clock(Lineup).Name"];
Expand Down
5 changes: 3 additions & 2 deletions html/views/overlays/interactive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,9 @@ function clockType(k,v) {

if(tc) {
ret = WS.state["ScoreBoard.Clock(Timeout).Name"];
if(to != "" && or) { ret = 'Official Review'; }
if(to != "" && !or) { ret = 'Team Timeout'; }
if(to != "" && to != "O" && or) { ret = 'Official Review'; }
if(to != "" && to != "O" && !or) { ret = 'Team Timeout'; }
if(to == "O") { ret = 'Official Timeout'; }
$('.ClockDescription').css('backgroundColor', 'red');
} else if(lc) {
ret = WS.state["ScoreBoard.Clock(Lineup).Name"];
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/standard/overlay-16x9.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Official T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
5 changes: 3 additions & 2 deletions html/views/overlays/standard/overlay-4x3.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ function manageStatusBar() {
var timeoutOwner = $sb("ScoreBoard.TimeoutOwner").$sbGet();
var statusString = "Error";
if (!timeoutOwner) {
// It's an OTO
statusString = "Timeout";
$(".TimeOuts").animate({"background-color":'pink'}, 500);
} else {
} else if (timeoutOwner == "O") {
statusString = "Official Timeout";
} else {
// It's owned. It'll either be an OR or a TTO.
// Set the background of the owning team to red.
$("#Team"+timeoutOwner+"TimeOuts").animate({"background-color":'red'}, 500);
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/standard/overlay-top.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Official T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/tcdg/overlay-16x9-pip.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Official Timeout";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Official Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/tcdg/overlay-16x9-trans.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Official Timeout";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Official Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/tcdg/overlay-4x3-trans.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Official Timeout";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Official Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/tcdg/overlay-4x3.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Official Timeout";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Official Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/overlay-logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ function manageStatusBar() {

if ($sb("Scoreboard.InOvertime").$sbIsTrue()) {
statusString = "Overtime";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("Scoreboard.Clock(Jam).Running").$sbIsTrue()) {
statusString = "Jam";
} else if ($sb("Scoreboard.Clock(Timeout).Running").$sbIsTrue()) {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color_alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color_nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color_nl_alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color_nl_w.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color_orig.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
2 changes: 2 additions & 0 deletions html/views/overlays/wftda/wg_color_w.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ function manageStatusBar() {
// Who's timeout is it?
if (!$sb("ScoreBoard.TimeoutOwner").$sbGet()) {
statusString = "Timeout";
} else if ($sb("ScoreBoard.TimeoutOwner").$sbGet() == "O") {
statusString = "Off. T/O";
} else if ($sb("ScoreBoard.OfficialReview").$sbIsTrue()) {
statusString = "Review";
} else {
Expand Down
6 changes: 5 additions & 1 deletion html/views/scoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ function setupTeams() {
if (isOfficialReview) {
$(".Timeout>div.Name>a>span.Name").html("Off. Rev.");
} else if (isTeamTimeout) {
$(".Timeout>div.Name>a>span.Name").html("Team T/O");
if (isTeamTimeout == "O") {
$(".Timeout>div.Name>a>span.Name").html("Off. T/O");
} else {
$(".Timeout>div.Name>a>span.Name").html("Team T/O");
}
} else {
$(".Timeout>div.Name>a>span.Name").html("Time Out");
}
Expand Down
27 changes: 16 additions & 11 deletions html/views/standard/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,22 @@ function smallDescriptionUpdate(k, v) {
$(".Clock.Description").addClass("Red");

ret = tcn;
if (to != "" && !or) {
ret = "Team Timeout";
$(".Team" + to + ">.Timeouts").addClass("Red");
var dotSel = ".Team" + to + " .Timeout" + (WS.state["ScoreBoard.Team(" + to + ").Timeouts"] + 1);
$(dotSel).addClass("Active");
}
if (to != "" && or) {
ret = "Official Review";
$(".Team" + to + ">.OfficialReviews:not(.Header)").addClass("Red");
var dotSel = ".Team" + to + " .OfficialReview" + (WS.state["ScoreBoard.Team(" + to + ").OfficialReviews"] + 1);
$(dotSel).addClass("Active");
if (to != "") {
if (to == "O") {
ret = "Official Timeout";
} else {
if (or) {
ret = "Official Review";
$(".Team" + to + ">.OfficialReviews:not(.Header)").addClass("Red");
var dotSel = ".Team" + to + " .OfficialReview" + (WS.state["ScoreBoard.Team(" + to + ").OfficialReviews"] + 1);
$(dotSel).addClass("Active");
} else {
ret = "Team Timeout";
$(".Team" + to + ">.Timeouts").addClass("Red");
var dotSel = ".Team" + to + " .Timeout" + (WS.state["ScoreBoard.Team(" + to + ").Timeouts"] + 1);
$(dotSel).addClass("Active");
}
}
}
}
return ret;
Expand Down
Loading

0 comments on commit 01a1eb8

Please sign in to comment.