-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
195 lines (143 loc) · 5.78 KB
/
index.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<html>
<head>
<title>Fifa manager</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/custom.css" media="screen" title="no title" charset="utf-8">
<style media="screen">
</style>
</head>
<body>
<div class="container">
<!-- Static navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Fifa manager</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">Home</a></li>
<li><a href="players.html">Players </a></li>
</ul>
</div><!--/.container-fluid -->
</nav>
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Summary matches</h1>
<p>You can see a summary of the matches you've played.</p>
</div>
<div class="panel panel-default">
<div class="panel-body">
<ul class="nav nav-pills">
<li class="active"><a data-toggle="tab" href="#addMatchForm">Add a new match</a></li>
<li><a data-toggle="tab" href="#statistics">Statistics</a></li>
</ul>
<hr>
<div class="tab-content">
<div id="addMatchForm" class="tab-pane fade in active">
<form class="form-horizontal" id="addMatchForm">
<div class="col-md-5">
<!-- Select Basic -->
<div class="form-group">
<div class="col-md-8 col-md-offset-3">
<select id="selectHomeTeam" name="homeTeamPlayer" class="form-control">
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<div class="col-md-8 col-md-offset-3">
<input id="homeTeamName" name="homeTeamName" type="text" placeholder="The home team's name" class="form-control input-md">
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-3">
<input id="textinput" name="homeTeamScore" type="text" placeholder="The home team's score" class="form-control input-md">
</div>
</div>
</div>
<div class="col-md-2">
<h1 class="text-center">VS</h1>
<button type="submit" id="addMatch" class="btn btn-xs btn-primary">Add match</button>
<button type="button" id="resetForm" class="btn btn-xs btn-default">Reset form</button>
</div>
<div class="col-md-5">
<!-- Select Basic -->
<div class="form-group">
<div class="col-md-8 col-md-offset-1">
<select id="selectAwayTeam" name="awayTeamPlayer" class="form-control">
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<div class="col-md-8 col-md-offset-1">
<input id="awayTeamName" name="awayTeamName" type="text" placeholder="The away team's name" class="form-control input-md">
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-1">
<input id="textinput" name="awayTeamScore" type="text" placeholder="The away team's score" class="form-control input-md">
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4 col-md-offset-4">
</div>
</div>
</form>
</div>
<div id="statistics" class="tab-pane fade">
<h3>Under construction</h3>
<p>This part has to be constructed yet.</p>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Home team</th>
<th>Away team</th>
<th>Home score</th>
<th>Away score</th>
<th>Player won</th>
<th>Remove</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</body>
<script src="bower_components/jquery/dist/jquery.min.js" charset="utf-8"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js" charset="utf-8"></script>
<script src="bower_components/store.js/store.min.js" charset="utf-8"></script>
<script src="bower_components/typeahead.js/dist/typeahead.bundle.min.js" charset="utf-8"></script>
<script src="js/tools.js" charset="utf-8"></script>
<script src="js/players.js" charset="utf-8"></script>
<script src="js/matches.js" charset="utf-8"></script>
<script src="js/teams.js" charset="utf-8"></script>
<script>
initStoreJs();
$(function() {
initPlayers($('#selectHomeTeam'), $('#selectAwayTeam'));
initAutoCompleteBoxes();
updateMatchTable($('table'));
$( "form#addMatchForm" ).submit(function( event ) {
addMatch($(this).serializeObject());
updateMatchTable($('table'));
event.preventDefault();
event.stopPropagation();
});
$('button.remove-match').on('click', function(event) {
removeMatch(event.target.id);
updateMatchTable($('table'));
});
});
</script>
</html>