-
Notifications
You must be signed in to change notification settings - Fork 1
/
player.html
133 lines (113 loc) · 4.48 KB
/
player.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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<script src="scripts/json2.js"> </script> <!-- this to make IE work -->
<script src="scripts/jquery-1.10.2.min.js"> </script>
<script src="scripts/jsrender.js"> </script>
<script src="scripts/footy.js"> </script>
<script src="scripts/Chart.js"> </script>
<script src="scripts/player.js"> </script>
<link rel="stylesheet" href="css/footy.css" />
<link rel="stylesheet" href="css/player.css" />
<link rel="stylesheet" href="css/results.css" />
<link href='http://fonts.googleapis.com/css?family=Port+Lligat+Slab' rel='stylesheet' type='text/css'>
<title>Table Tennis - player stats</title>
</head>
<body>
<script>
$( document ).ready(function() {
startup();
drawtable();
create_stats();
addClickHandlers();
});
</script>
<div class="main_container">
<div class="navbar">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</div>
<h1>Player stats - <span class="id"></span></h1>
<img id="ttennis_doodle" src="ttennis_doodle.png" alt="table tennis doodle"/>
<hr>
<ul>
<li><span class="id"></span> rating range: <span id="singles_min">1600</span>-<span id="singles_max">2298</span></li>
<li>Current run: <span id="current_singles_run"></span></li>
<li>Best run: <span id="best_singles_run"></span></li>
<li>Worst run: <span id="worst_singles_run"></span></li>
<li> </li>
<li>Total wins: <span id="total_wins"></span></li>
<li>Total losses: <span id="total_losses"></span></li>
<li>Win percentage: <span id="win_percentage"></span></li>
</ul>
<div id="player_page" class="player_page">
<div class="chart_pPage">
<canvas id="singles_chart" width="680" height="360"></canvas>
</div>
<div id="player_rec_res_tbl" class="results_tbl_pPage">
<div class="hdr">Recent Results</div>
<div id="rec_res_tbl">
<div id="result" class="resultrow"></div>
</div>
</div>
</div>
<hr>
<div id="filter_table" class="player_page">
<div id="player_opponents_tbl" class="filter_column">
<div id="opponent_headers">
<div class="hdr">Filter Opponents</div>
<button id="select_all" class="filter_button">Select All</button>
<button id="deselect_all" class="filter_button">Deselect All</button>
</div>
<div class="result_display">
<span class="result_display">Number of Results:</span>
<input class="result_display" id="head_to_head_range" type="range" value="25" min="25" max="200"></input>
<output class="result_display" id="results_output"></output>
</div>
<div id="opponents_tbl">
<div id="opponent" class="opponentrow"></div>
</div>
</div>
<div id="head_to_head_stats" class="results_tbl_pPage">
<div class="hdr">Head to Head Stats</div>
<ul>
<li>Head to Head games: <span id="head_to_head_games"></span></li>
<li>Head to Head wins: <span id="head_to_head_wins"></span></li>
<li>Head to Head losses: <span id="head_to_head_losses"></span></li>
<li>Head to Head win percentage: <span id="head_to_head_win_percentage"></span></li>
<li>Head to Head elo change: <span id="head_to_head_elo_change"></span></li>
</ul>
</div>
<div id="opp_res_tbl">
<div class="hdr">Head to Head Results</div>
<div id="result" class="resultrow"></div>
</div>
</div>
</div>
<script id="resultTemplate" type="text/x-jsrender">
<div id="result" class="resultrow">
<div class="res_delta res_delta_left {{:res_delta_class}}">({{:id_res}}{{:delta}})</div>
<div class="res_rank">{{:id_rank}}</div>
<div class="res_player">
<a class="idlink" href="player.html?{{:id}}">{{:id}}</a>
</div>
<div class="res_divider_player_page">{{:result}}</div>
<div class="res_player">
<a class="idlink" href="player.html?{{:opponent}}">{{:opponent}}</a>
</div>
<div class="res_rank">{{:opp_rank}}</div>
<div class="res_delta res_delta_right {{:opp_res_delta_class}}">({{:opp_res}}{{:delta}})</div>
</div>
</script>
<script id="opponentsTemplate" type="text/x-jsrender">
<div id="opponent" class="opponentrow result_display">
<div class="opponent opp_check_box result_display">
<input id="opp_check_box_{{:id}}" type="checkbox" class="chk result_display">
</div>
<div class="opponent res_player result_display">
<a class="idlink" href="player.html?{{:id}}">{{:id}}</a>
</div>
</div>
</script>