Skip to content

Commit

Permalink
Update mobile operator page alternate name processing to fix jam cont…
Browse files Browse the repository at this point in the history
…rol page team name buttons with alternate names
  • Loading branch information
ddstreet committed Oct 22, 2013
1 parent 29f8ff8 commit b4a6694
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions html/controls/mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
/* END ClockBubbles */

/* Alternate Names */
.HasAlternateName>.Name { display: none; }
:not(.HasAlternateName)>.AlternateName { display: none; }
.Name.HasAlternateName { display: none; }
.AlternateName:not(.HasAlternateName) { display: none; }
/* END Alternate Names */


Expand Down
8 changes: 6 additions & 2 deletions html/controls/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ $sb(function() {
setupPenaltyTimePage();

$.each( [ "1", "2" ], function(i, t) {
$sb("ScoreBoard.Team("+t+").AlternateName(mobile).Name").$sbBindAndRun("sbchange", function(event, val) {
$(".Team"+t+".AlternateName").parent().toggleClass("HasAlternateName", val != "");
$sb("ScoreBoard.Team("+t+")").$sbBindAddRemoveEach("AlternateName", function(event, node) {
if ($sb(node).$sbId == "mobile")
$sb(node).$sb("Name").$sbBindAndRun("sbchange", function(event2, val) {
$(".Team"+t+".Name,.Team"+t+".AlternateName")
.toggleClass("HasAlternateName", $.trim(val) != "");
});
});
});
});
Expand Down

0 comments on commit b4a6694

Please sign in to comment.