Fix some UI bugs.

This commit is contained in:
Patrick Fairbank
2017-09-03 22:23:48 -07:00
parent bc63a99e2e
commit d91b530bef
4 changed files with 10 additions and 9 deletions

View File

@@ -106,8 +106,8 @@ var handleMatchTime = function(data) {
// Handles a websocket message to update the match score.
var handleRealtimeScore = function(data) {
$("#redScore").text(data.RedScoreFields.Score);
$("#blueScore").text(data.BlueScoreFields.Score);
$("#redScore").text(data.RedScore);
$("#blueScore").text(data.BlueScore);
};
$(function() {

View File

@@ -106,10 +106,11 @@ var handlePlaySound = function(sound) {
// Handles a websocket message to update the alliance selection screen.
var handleAllianceSelection = function(alliances) {
if (alliances) {
var numColumns = alliances[0].length + 1;
$.each(alliances, function(k, v) {
v.Index = k + 1;
});
$("#allianceSelection").html(allianceSelectionTemplate(alliances));
$("#allianceSelection").html(allianceSelectionTemplate({alliances: alliances, numColumns: numColumns}));
}
};