-
Notifications
You must be signed in to change notification settings - Fork 0
/
mobile.html
289 lines (272 loc) · 17.4 KB
/
mobile.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<!DOCTYPE html>
<html>
<head>
<title>Hunger Games Mobile</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<link href="css/bootstrap-2.3.2.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive-2.3.2.min.css" rel="stylesheet">
<!-- <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> -->
<link href="css/mobile.css" rel="stylesheet">
<link href="css/jquery.toastmessage.css" rel="stylesheet">
<link href="css/patchgraph.css" rel="stylesheet">
<script type="text/javascript" src="libs/d3.v3.min.js"></script>
<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> -->
<script type="text/javascript" src="libs/jquery-1.9.1.js"></script>
<!-- <script type="text/javascript" src="libs/jquery-1.9.1.min.js"></script> -->
<!-- <script type="text/javascript" src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.js"></script> -->
<script type="text/javascript" src="libs/bootstrap-2.3.2.min.js"></script>
<script type="text/javascript" src="node_modules/underscore/underscore.js"></script>
<script type="text/javascript" src="node_modules/backbone/backbone.js"></script>
<script type="text/javascript" src="node_modules/backbone.drowsy/backbone.drowsy.js"></script>
<script type="text/javascript" src="node_modules/backbone.drowsy/wakeful.js"></script>
<script type="text/javascript" src="libs/jquery.toastmessage.js"></script>
<script type="text/javascript" src="libs/jquery.cookie.js"></script>
<script type="text/javascript" src="js/hunger-games.js"></script>
<script type="text/javascript" src="js/model.js"></script>
<script type="text/javascript" src="js/rollcall.js"></script>
<script type="text/javascript" src="js/patchgraph.js"></script>
<script type="text/javascript" src="js/mobile.js"></script>
<script type="text/javascript" src="js/mobile.view.js"></script>
<script id="list-view-template" type="text/template">
<li class="list-item">
<a id="note-id-<%= _id %>" class="note">
<div class="author-container" style="background-color: <%= color %> ;"><div class="author"><%= author %></div></div>
<div class="part part-1"><%= part_1 %></div>
<div class="part part-2"><%= part_2 %></div>
<div class="create-reply-btn">Reply</div>
</a>
<a class="reply-entry hidden">
<textarea class="field reply-text-entry" name="reply" type="text"></textarea>
<button class="submit-reply-btn btn-success">Submit</button>
</a>
</li>
</script>
<script id="reply-view-template" type="text/template">
<a class="reply">
<div class="author-container"><div class="author"><%= author %></div></div>
<div class="content"><%= content %></div>
</a>
</script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<!-- .btn-navbar is used as the toggle for collapsed navbar content
TODO: what does this until brand do? Took it out and didn't see change-->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Hunger Games</a>
<div class="nav-collapse collapse navbar-responsive-collapse">
<ul class="nav nav-pills">
<!-- <li class=" refresh-button"><a href="#">Refresh</a></li> -->
<li class=" notes-button"><a href="#">Notes</a></li>
<li class=" worth-remembering-button"><a href="#">Worth remembering</a></li>
<li class=" equalization-button"><a href="#">Equalization</a></li>
<!-- <li class="active move-tracker-button"><a href="#">Move tracker</a></li> -->
<li class=" graphs-button"><a href="#">Harvest</a></li>
</ul>
<form class="navbar-form pull-right">
<!-- Default behaviour of a input field in a form is to submit the form and reload
the page. We don't want that at all. To circumvent this we add an onkeypress handler
that calls the interceptKeypress function. This function calls loginUser if
the 'return' key is pressed and then returns false to avoid bubbling of the event
see also:
http://stackoverflow.com/questions/905222/enter-key-press-event-in-javascript
-->
<input class="hidden" id="username" type="text" name="username" autocomplete="on" placeholder="Please enter name" title="error" pattern="^[a-zA-Z0-9]+$" maxlength="25" onkeypress="return HG.Mobile.interceptKeypress(event)" />
<div class="alert alert-error input-alert">
<strong>Error!</strong> Name can only be alphanumerical without whitespace!
</div>
<button id="login-button" type="submit" class="btn btn-primary">Get me in!</button>
<!-- <a id="login-button" class="btn btn-primary">Get me in!</a> -->
</form>
<ul class="nav pull-right">
<li class="active username-display"><a></a></li>
<li class="active logout-user"><a>Logout</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="notes-screen" class="row-fluid">
<div class="span12 view-container bs-docs-sidebar">
<div class="input-box-wrapper">
<select id="activity-dropdown">
<!--<option value="activity-1">In-Class Activity: My Bout Moves</option>
<option value="activity-2">Day 2, Activity 6: Reflecting on Bout 2</option>
<option value="activity-3">Activity 3</option>
<option value="activity-4">Activity 4</option>
<option value="activity-5">Activity 5</option> -->
</select>
<a id="share-note-btn" class="btn btn-large btn-success">
Submit
</a>
</div>
<div id="input-screen" class="input-box-wrapper">
<textarea class="field note-entry-field part-1-text-entry" id="note-part-1-entry" name="part_1" ></textarea>
<textarea class="field note-entry-field part-2-text-entry" id="note-part-2-entry" name="part_2" ></textarea>
</div>
<div id="list-screen" class="bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav affix-top scrollable">
<!-- filled by some ListView -->
</ul>
</div>
</div>
</div>
<div id="worth-remembering-screen" class="row-fluid">
<div class="span12 view-container bs-docs-sidebar">
<a id="share-worth-remembering-btn" class="btn btn-large btn-success">
Submit
</a>
<div id="worth-remembering-input-screen">
<textarea class="field worth-remembering-entry-field" id="worth-remembering-entry" name="worth_remembering"></textarea>
</div>
<div id="worth-remembering-list-screen" class="bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav affix-top scrollable">
<!-- filled by worth remembering ListView -->
</ul>
</div>
</div>
</div>
<div id="equalization-screen" class="row-fluid map-screen-wrapper">
<div class="span12 view-container bs-docs-sidebar map-screen">
<div class="map-title">
<div>Can you arrange the squirrels so that each squirrel gets the same harvest in
<span id="equalization-minutes-field"></span> minutes?</div>
Squirrels assigned: <span id="squirrels-assigned" class="map-title">0</span> <!-- of <span class='max-squirrels'></span> -->
</div>
<div class="patch-a patch">
<div><label>Number of squirrels: <input class="equalization-squirrels-field" value=0 min=0 type="number" data-patch="a"/></label></div>
<div>Harvest per squirrel: <span class="equalization-harvest-field"></span></div>
<div>Patch time all squirrels: <span class="equalization-patch-time-field"></span></div>
</div>
<div class="patch-b patch">
<div><label>Number of squirrels: <input class="equalization-squirrels-field" value=0 min=0 type="number" data-patch="b"/></label></div>
<div>Harvest per squirrel: <span class="equalization-harvest-field"></span></div>
<div>Patch time all squirrels: <span class="equalization-patch-time-field"></span></div>
</div>
<div class="patch-c patch">
<div><label>Number of squirrels: <input class="equalization-squirrels-field" value=0 min=0 type="number" data-patch="c"/></label></div>
<div>Harvest per squirrel: <span class="equalization-harvest-field"></span></div>
<div>Patch time all squirrels: <span class="equalization-patch-time-field"></span></div>
</div>
<div class="patch-d patch">
<div><label>Number of squirrels: <input class="equalization-squirrels-field" value=0 min=0 type="number" data-patch="d"/></label></div>
<div>Harvest per squirrel: <span class="equalization-harvest-field"></span></div>
<div>Patch time all squirrels: <span class="equalization-patch-time-field"></span></div>
</div>
<div class="patch-e patch">
<div><label>Number of squirrels: <input class="equalization-squirrels-field" value=0 min=0 type="number" data-patch="e"/></label></div>
<div>Harvest per squirrel: <span class="equalization-harvest-field"></span></div>
<div>Patch time all squirrels: <span class="equalization-patch-time-field"></span></div>
</div>
<div class="patch-f patch">
<div><label>Number of squirrels: <input class="equalization-squirrels-field" value=0 min=0 type="number" data-patch="f"/></label></div>
<div>Harvest per squirrel: <span class="equalization-harvest-field"></span></div>
<div>Patch time all squirrels: <span class="equalization-patch-time-field"></span></div>
</div>
</div>
</div>
<div id="move-tracker-screen" class="row-fluid map-screen-wrapper">
<div class="span12 view-container bs-docs-sidebar map-screen">
<div id="footprints-img">
<div id="move-tracker-title-box">
<div class="map-title">
<button id="move-backward" class="move-button"><</button>
Bout <span class="bout-number"></span> moves for <span class="username"></span>: Move <span id="move-number"></span>
<button id="move-forward" class="move-button">></button>
</div>
</div>
<div class="patch-a patch">
<div>Number of squirrels: <span class="move-tracker-squirrels-field"></span></div>
<div>Current yield: <span class="move-tracker-yield-field"></span> cal</div>
<div class="move-tracker-new-yield-label">If I move here: <span class="move-tracker-new-yield-field"></span> cal</div>
<!-- <div class="hidden">Risk level: <span class="move-tracker-risk-field"></span></div> -->
</div>
<div class="patch-b patch">
<div>Number of squirrels: <span class="move-tracker-squirrels-field"></span></div>
<div>Current yield: <span class="move-tracker-yield-field"></span> cal</div>
<div class="move-tracker-new-yield-label">If I move here: <span class="move-tracker-new-yield-field"></span> cal</div>
<!-- <div class="hidden">Risk level: <span class="move-tracker-risk-field"></span></div> -->
</div>
<div class="patch-c patch">
<div>Number of squirrels: <span class="move-tracker-squirrels-field"></span></div>
<div>Current yield: <span class="move-tracker-yield-field"></span> cal</div>
<div class="move-tracker-new-yield-label">If I move here: <span class="move-tracker-new-yield-field"></span> cal</div>
<!-- <div class="hidden">Risk level: <span class="move-tracker-risk-field"></span></div> -->
</div>
<div class="patch-d patch">
<div>Number of squirrels: <span class="move-tracker-squirrels-field"></span></div>
<div>Current yield: <span class="move-tracker-yield-field"></span> cal</div>
<div class="move-tracker-new-yield-label">If I move here: <span class="move-tracker-new-yield-field"></span> cal</div>
<!-- <div class="hidden">Risk level: <span class="move-tracker-risk-field"></span></div> -->
</div>
<div class="patch-e patch">
<div>Number of squirrels: <span class="move-tracker-squirrels-field"></span></div>
<div>Current yield: <span class="move-tracker-yield-field"></span> cal</div>
<div class="move-tracker-new-yield-label">If I move here: <span class="move-tracker-new-yield-field"></span> cal</div>
<!-- <div class="hidden">Risk level: <span class="move-tracker-risk-field"></span></div> -->
</div>
<div class="patch-f patch">
<div>Number of squirrels: <span class="move-tracker-squirrels-field"></span></div>
<div>Current yield: <span class="move-tracker-yield-field"></span> cal</div>
<div class="move-tracker-new-yield-label">If I move here: <span class="move-tracker-new-yield-field"></span> cal</div>
<!-- <div class="hidden">Risk level: <span class="move-tracker-risk-field"></span></div> -->
</div>
</div>
</div>
</div>
<div id="graphs-screen" class="row-fluid">
<div class="span12 view-container bs-docs-sidebar">
<div class="btn-toolbar patchgraph-toolbar">
<div class="btn-group sort-buttons">
<button type="button" class="btn btn-large btn-success graph-sort-btn" id="harvest" data-selector="harvest">Calories</button>
<button type="button" class="btn btn-large btn-success graph-sort-btn" id="richPatch" data-selector="avg_quality">Quality</button>
<button type="button" class="btn btn-large btn-success graph-sort-btn" id="patchCompetition" data-selector="avg_competition">Competition</button>
<button type="button" class="btn btn-large btn-success graph-sort-btn" id="patchMoves" data-selector="total_moves">Number of Moves</button>
<button type="button" class="btn btn-large btn-success graph-sort-btn" id="arbitrage" data-selector="arbitrage">Productive Moves</button>
<!-- <button type="button" class="btn btn-large btn-success graph-sort-btn" id="predation" data-selector="predation">Predation</button> -->
</div>
<div class="btn-group">
<button id="bout-picker-label" class="btn btn-large btn-primary dropdown-toggle" data-toggle="dropdown">Choose bout <span class="caret"></span></button>
<ul id="bout-picker" class="dropdown-menu" role="menu">
<!--<li><a tabindex="-1" href="#" data-bout="1">Example of a line - created in code</a></li>-->
</ul>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div id="login-picker" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="login-picker" aria-hidden="true">
<div class="modal-header">
<!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> -->
<h3>Please log in</h3>
</div>
<div class="modal-body login-buttons">
<!-- filled by java script with buttons for user login -->
</div>
<!-- <div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div> -->
</div>
<div class="orientation-warning">
<p>If you hold me like that I am of no use :(<p>
<img src="img/fighting_squirrels.png" alt="Two fighting squirrels" />
<p>Please hold the device in landscape orientation!</p>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
// extending jQuery http://stackoverflow.com/questions/31044/is-there-an-exists-function-for-jquery
jQuery.fn.exists = function(){return this.length>0;}
HG.Mobile.init();
});
</script>
</body>
</html>