-
Notifications
You must be signed in to change notification settings - Fork 2
/
standard.html
136 lines (125 loc) · 6.38 KB
/
standard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<html>
<head>
<title>Web Score System - Rolling Clock</title>
<!--<script src="./js/lowLag.js"></script>-->
<!--<script src="./js/sm2/js/soundmanager2.js"></script>-->
<script src="./js/howler/howler.js"></script>
<script src='./js/jquery-3.1.0.min.js'></script>
<script src="./js/jquery-ui.min.js"></script>
<script src='./js/tock.min.js'></script>
<script src='./js/standard.js'></script>
<!--<script src='./js/jquery.timer.js'></script>-->
<link rel='stylesheet' href='./css/jquery-ui.css' />
<link rel='stylesheet' href='./css/board.css' />
</head>
<body>
<!-- Let's do the timer things -->
<div class='half' id='timer-attributes'>
<h2>Display clock</h2>
<span id="match-timer">00:00:00</span><br />
Period: <span id="match-period">Waiting for start</span><br />
<form id="match-timer-form">
<button type='button' onclick='startGame();toggleClock(MatchClockTock);' id='clock-toggle' style="width: 90%; margin: 5%">Resume/Pause Time<br />
<small style="background-color:yellow">(Spacebar)</small></button>
<ul>
<li><a href="#mtf-controls">Time controls</a></li>
<li><a href="#mtf-altertime">Alter game times</a></li>
</ul>
<table id="mtf-controls">
<tr><td colspan=4>
<!-- <input type='button' value='Stop/Reset' onclick='MatchClock.resetCountdown();' /><br /> -->
<!-- <input type='text' name='startTime' value='900' style='width:30px;' /><br /> -->
<tr><td><input type='button' value='+1 min' onclick='MatchClockTock.alterTime(60.)' /></td>
<td><input type='button' value='+10 sec' onclick='MatchClockTock.alterTime(10.)' /></td>
<td><input type='button' value='+1 sec' onclick='MatchClockTock.alterTime(1.)' /></td>
<td><input type='button' value='+0.1 sec' onclick='MatchClockTock.alterTime(0.1)' /></td></tr>
<tr><td><input type='button' value='-1 min' onclick='MatchClockTock.alterTime(-60.)' /></td>
<td><input type='button' value='-10 sec' onclick='MatchClockTock.alterTime(-10.)' /></td>
<td><input type='button' value='-1 sec' onclick='MatchClockTock.alterTime(-1.)' /></td>
<td><input type='button' value='-0.1 sec' onclick='MatchClockTock.alterTime(-0.1)' /></td></tr>
<tr><td colspan="2"><button type='button' onclick='alterPeriod(-1)' >← Prev. time block</button></td>
<td colspan="2" style="text-align: right;"><button type='button' onclick='alterPeriod(1)'>Next time block →</button></td>
</tr>
<tr><td> </td>
<td colspan=2><input type='button' value='End game/reset system' onclick='resetGameManual(MatchClockTock)' /></td>
<td> </td>
</tr>
</table>
<div id="mtf-altertime">
Number of periods in the game: <select id='match-timer-no-periods'></select><br />
Length of each period: <select id='match-timer-len-period'></select> minutes<br />
Length of each period break: <select id='match-timer-len-break'></select> minutes<br />
Auto-roll the clock into new periods? <input type='checkbox' id='match-timer-roll-into-period' style="transform: scale(2,2)" checked /><br />
Auto-roll the clock into period breaks? <input type='checkbox' id='match-timer-roll-into-break' style="transform: scale(2,2)" checked /><br />
</div>
</form>
</div>
<!-- <div class='half' id='timer-attributes' style='background:pink;'>
<h2>Display clock</h3>
<span id="match-timer">00:00:00</span><br />
Period: <span id="match-period">Waiting for start</span><br />
<form id="match-timer-form">
<input type='button' value='Play/Pause' onclick='startGame();MatchClock.Timer.toggle();' />
<input type='button' value='Stop/Reset' onclick='MatchClock.resetCountdown();' /><br />
<input type='button' value='+1 min' onclick='MatchClock.alterTime(60.)' />
<input type='button' value='+10 sec' onclick='MatchClock.alterTime(10.)' />
<input type='button' value='+1 sec' onclick='MatchClock.alterTime(1.)' /><br />
<input type='button' value='-1 min' onclick='MatchClock.alterTime(-60.)' />
<input type='button' value='-10 sec' onclick='MatchClock.alterTime(-10.)' />
<input type='button' value='-1 sec' onclick='MatchClock.alterTime(-1.)' /><br />
No periods: <select id='match-timer-no-periods'></select><br />
Len. period: <select id='match-timer-len-period'></select><br />
Len. break: <select id='match-timer-len-break'></select><br />
Rolling clock? <input type='checkbox' id='match-timer-rolling' checked /><br />
</form>
</div> -->
<div class='half' id='team-attributes' style='background: cyan;'>
<div class='home'>
<h2>Team information</h2>
<h3>Home team</h3>
Team: <select id='team-home'>
<option val='' default></option>
</select><br />
<table><tr><td>
<div class='team-img' id='team-img-home'></div>
<div class='team-score' id='team-score-home'></div>
<button type='button' onclick='alterHomeScore(1)' >+ goal <g style="background-color:yellow">(H)</g></button><br />
<button type='button' onclick='alterHomeScore(-1)' >- goal</button>
</div></td></tr>
<tr><td>
<div class='away'>
<h3>Away team</h3>
Team: <select id='team-away'>
<option val='' default></option>
</select><br />
<div class='team-img' id='team-img-away'></div>
<div class='team-score' id='team-score-away'></div>
<button type='button' onclick='alterAwayScore(1)' >+ goal <g style="background-color:yellow">(A)</g></button><br />
<button type='button' onclick='alterAwayScore(-1)' >- goal</button>
</div>
</td></tr></table>
</div>
<div style='clear:both;'>
<button id='window-open'>Open external display</button> <br/><br />
Arm manual buzzer: <input type="checkbox" id="arm-manual-buzzer" style="transform: scale(2,2)" />, then click:<br />
<button id="manual-buzzer" disabled>Sound buzzer manually</button>
</div>
<p><g style="background-color: yellow">Highlighted text</g> shows the keyboard shortcuts than can be
used instead of the mouse to perform certain actions.</p>
</body>
<!-- Do some other binding actions -->
<script>
// Bind spacebar to start/stop clocks
$(window).keypress(function(e) {
console.log(e.which);
if (e.which == 32 ) { // Spacebar
startGame();
toggleClock(MatchClockTock);
} else if (e.which == 104) { // h
alterHomeScore(1);
} else if (e.which == 97) { // a
alterAwayScore(1);
}
});
</script>
</html>