-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
550 lines (428 loc) · 17.9 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
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<!DOCTYPE html>
<html>
<head>
<title>Xigen Timer</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Demo project">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/dist/XigenTimer.min.css">
<style type="text/css"></style>
</head>
<body>
<!-- App Nav -->
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><img src="assets/svg/xigen_logo_whiteout.svg" alt="Xigen" /></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#">Menu</a></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="has-form">
<a class="button" data-bind="visible: isLoggedIn, click: checkPulse(), css: { success: isConnected, alert: !isConnected() }, text: connectedText"></a>
</li>
<li data-bind="visible:isLoggedIn" class="active logout"><a data-avatar data-logout href="#"><span>Logout</span></a></li>
<li class='icon icon-min'><a href="#"><img src="assets/svg/minimise.svg" /></a></li>
<li data-bind="visible: notOSX" class='icon icon-hide'><a href="#"><img src="assets/svg/hide.svg" /></a></li>
<li class='icon icon-close'><a href="#"><img src="assets/svg/close.svg" /></a></li>
</ul>
<!-- Left Nav Section -->
<ul class="left">
<li data-bind="visible:isLoggedOut" class="active"><a href="#">Login</a></li>
<li data-bind="visible:isLoggedIn, css: { active: isOverview }"><a href="#" data-bind="click: selectOverview">Timer</a></li>
<li data-bind="visible:isLoggedIn, css: { active: isViewingTasks }"><a href="#" data-bind="click: selectTasks">My Tasks <span data-bind="visible: taskList().length > 0, text: taskList().length" class='label secondary'></a></li>
<li data-bind="visible:isLoggedIn, css: { active: isEditingTime }"><a href="#" data-bind="click: selectTiming">My Time</a></li>
<li data-bind="visible:isLoggedIn, css: { active: isRestoringTime }"><a href="#" data-bind="click: selectRestore">States <span data-bind="visible: savedStates().length > 0, text: savedStates().length" class='label secondary'></span></a></li>
<li data-bind="visible:isLoggedIn && isProjectManager, css: { active: isManaging }"><a href="#" data-bind="click: selectManagement">Management<span data-bind="visible: managedTaskList().length > 0, text: managedTaskList().length" class='label secondary'></span></a></li>
<li data-bind="visible:isLoggedIn" data-reveal-id="settingsMenu" ><a href="#">Settings</a></li>
<li data-bind="visible:isLoggedIn" data-reveal-id="shortcutMenu" ><a href="#">Help</a></li>
</ul>
</section>
</nav>
<div class="content-wrap">
<!-- Login Screen -->
<div class="row" data-bind="visible:isLoggedOut">
<div class="small-5 small-centered columns">
<div class="panel login">
<form method="POST" action="" data-login>
<div class="row">
<div class="small-12 columns l-centered">
<h3>Login</h3>
</div>
</div>
<div class="row">
<div class="small-12 columns">
<label for="user">Username:</label>
</div>
<div class="small-12 columns l-centered">
<input name="user" id="user" type="text" />
</div>
</div>
<div class="row">
<div class="small-12 columns">
<label for="password">Password:</label>
</div>
<div class="small-12 columns l-centered">
<input name="password" id="password" type="password" />
</div>
</div>
<div class="row">
<div class="small-12 columns">
<label for="baseURL">Projects URL:</label>
</div>
<div class="small-12 columns l-centered">
<input name="baseURL" id="baseURL" type="text" value="http://projects.xigen.co.uk" />
</div>
</div>
<div class="row">
<div class="small-12 columns l-centered">
<button type="submit" class="button info expand">Log me in!</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- END LOGIN -->
<div class="row collapse" data-bind="visible: isOverview">
<div class="small-4 columns sidebar">
<div class="sidebar-filter-wrap">
<input tabindex="1" type="text" class="filter-text" placeholder="Filter Projects..." />
<button class="tiny secondary do-clearfilter">X</button>
<button class="tiny secondary do-refresh" data-bind="disable: !isConnected()"><img src="assets/svg/refresh.svg" /></button>
</div>
<div class="sidebar-projects-wrap">
<ul class="side-nav">
<li><a href="#">Loading Projects...</a></li>
</ul>
</div>
</div>
<div class="small-8 columns">
<div class="row">
<div class="small-12 columns">
<!-- <ul class="breadcrumbs">
<li class="unavaliable"><img src="assets/svg/alert.svg" />
<span>Please select a task on the left to begin.</span></li>
</ul> -->
<span data-tooltip class="has-tip is-projectText" title="Select a task to begin">Select a task on the left to begin.</span>
</div>
<div class="small-12 columns">
<div class="panel callout radius">
<div class="row collapse">
<div class="small-6 columns">
<label>Estimated Time:</label>
<label data-estimate>---</label>
</div>
<div class="small-6 columns">
<label>Your time logged:</label>
<label data-sofar>---</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="small-12 columns l-centered">
<div class="timer"></div>
</div>
<div class="small-3 columns">
<button class="do-timestart button expand success" disabled data-bind="enable: hasProjectSelected">Start</button>
</div>
<div class="small-3 columns">
<button class="button expand" data-bind="enable: canSaveState, click: saveState">Save State</button>
</div>
<div class="small-3 columns">
<button class="do-edit button secondary expand" data-reveal-id="customTime" data-bind="enable: canEdit" >Edit</button>
</div>
<div class="small-3 columns">
<button class="do-send button expand" data-bind="enable: canSendTime, css: { secondary: !canSendTime() }">Send Hours</button>
</div>
<div class="small-12 columns">
<label for="desc">Description*:</label>
<textarea tabindex="2" id="desc" data-bind="value:activityDesc, valueUpdate: 'keyup'"></textarea>
</div>
<div class="small-3 columns">
<input id="isBillable" type="checkbox" checked />
<label for="isBillable">Billable?</label>
</div>
<div class="small-5 columns" data-bind="visible: showMarkComplete">
<input id="markReview" type="checkbox" />
<label for="markReview" data-bind="text: markText">Waiting internal review?</label>
</div>
<div class="small-4 columns">
<button class="do-viewonline reset-button success" data-bind="enable: hasProjectSelected, attr: { 'data-id': selectedProject }">View Task</button>
<button class="do-reset reset-button alert">Reset</button>
</div>
</div>
</div>
</div>
<!-- Restore Time -->
<div class="row scroll-container" data-bind="visible: isRestoringTime">
<div class="small-12 columns">
<table class="time-table-state">
<thead>
<tr>
<th>State Save Time:</th>
<th>Task</th>
<th>Duration</th>
<th>Description</th>
<th></th>
</tr>
</thead>
<!-- ko if: savedStates().length -->
<tbody data-bind="foreach: savedStates">
<tr data-bind="attr: { 'data-id' : $index }">
<td data-bind="text: DateStored"></td>
<td data-bind="html: '<strong>' + ProjectName + ':</strong><br/>' + TaskName"></td>
<td data-bind="text: TimeLogged[0]"></td>
<td data-bind="text: Desc || '[Empty]'"></td>
<td>
<a class="button tiny info do-restore">Restore</a>
<a class="button tiny alert do-deleteState">Delete</a>
</td>
</tr>
</tbody>
<!-- /ko -->
<!-- ko if: savedStates().length === 0 -->
<tbody>
<tr>
<td colspan="5" align="center"><strong>No saved states. You clearly haven't been multitasking enough.</strong></td>
</tr>
</tbody>
<!-- /ko -->
</table>
</div>
</div>
<div class="row scroll-container" data-bind="visible: isEditingTime">
<div class="small-5 columns is-datepicker">
<div class="row collapse">
<div class="small-3 columns">
<span class="prefix">From:</span>
</div>
<div class="small-9 columns">
<input type="text" id="startDate" data-start class="datepicker" data-bind="disable: !isConnected()" />
</div>
</div>
</div>
<div class="small-5 columns is-datepicker">
<div class="row collapse">
<div class="small-3 columns">
<span class="prefix">To:</span>
</div>
<div class="small-9 columns">
<input type="text" id="startDate" data-end class="datepicker" data-bind="disable: !isConnected()" />
</div>
</div>
</div>
<div class="small-2 columns is-datepicker">
<div class="row collapse">
<div class="small-6 columns">
<span class="prefix">Total:</span>
</div>
<div class="small-6 columns">
<input type="text" disabled data-totalHours name="totalHours" />
</div>
</div>
</div>
<div class="small-12 columns">
<table class="time-table time-table-logs">
<thead>
<tr>
<th>When</th>
<th>Task</th>
<th>Duration</th>
<th>Description</th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!-- View Tasks -->
<div class="row scroll-container" data-bind="visible: isViewingTasks">
<div class="small-6 columns is-datepicker">
<div class="row collapse">
<div class="small-5 columns">
<a class="button secondary expand tiny do-refresh">Refresh List <img src="assets/svg/refresh.svg"></a>
</div>
</div>
</div>
<div class="small-12 columns">
<table class="time-table time-table-tasks">
<thead>
<tr>
<th>Project</th>
<th>Task</th>
<th>Estimated Hrs.</th>
<th>Due Date</th>
<th>Priority</th>
<th></th>
</tr>
</thead>
<!-- ko if: taskList().length > 0 -->
<tbody data-bind="foreach: taskList()">
<tr data-bind="attr: { 'data-id' : TaskID }">
<td><a target="_system" data-bind="attr: { 'href' : ProjectURL }, text: ProjectName"></a></td>
<td><a target="_viewProject" data-bind="attr: { 'href' : TaskURL, 'data-id' : TaskID }, text: Name"></a></td>
<td data-bind="text: EstimatedHours || 'No Estimate'"></td>
<td data-bind="text: DueDate, attr: { 'data-urgency' : $root.dateMagnitude(daysDifference) }"></td>
<td data-bind="attr: {'data-priority':PriorityID}, html: $root.priorities[PriorityID]"></td>
<td><a class="button success do-selectTask expand tiny">Start Task</a></td>
</tr>
</tbody>
<!-- /ko -->
<!-- ko if: taskList().length === 0 -->
<tbody>
<tr>
<td colspan="6" align="center"><strong>No tasks. Go make the tea!</strong></td>
</tr>
</tbody>
<!-- /ko -->
</table>
</div>
</div>
<!-- View Tasks -->
<div class="row scroll-container" data-bind="visible: isManaging">
<div class="small-12 columns is-datepicker">
<div class="row collapse">
<div class="small-2 columns">
<a class="button secondary expand tiny do-refresh">Refresh List <img src="assets/svg/refresh.svg"></a>
</div>
<div class="small-offset-1 small-2 columns">
<input type="checkbox" checked data-bind="checked: managedShowOpen" id="managementShowOpen">
<label for="managementShowOpen">Show Open?</label>
</div>
<div class="small-4 columns">
<input type="checkbox" data-bind="checked: managedShowReview" id="managementShowReview">
<label for="managementShowReview">Show Waiting Internal Review?</label>
</div>
<div class="small-3 columns">
<input type="checkbox" data-bind="checked: managedShowPending" id="managementShowPending">
<label for="managementShowPending">Show Client Pending?</label>
</div>
</div>
</div>
<div class="small-12 columns">
<table class="time-table time-table-tasks time-table-manage">
<thead>
<tr>
<th>Project</th>
<th>Task</th>
<th>Estimated Hrs.</th>
<th>Hours Logged</th>
<th>Due Date</th>
<th>Priority</th>
</tr>
</thead>
<!-- ko if: managedTaskList().length > 0 -->
<tbody data-bind="foreach: managedTaskList()">
<tr data-bind="attr: { 'data-id' : TaskID }">
<td><a target="_system" data-bind="attr: { 'href' : ProjectURL }, text: ProjectName"></a></td>
<td><a target="_manageProject" data-bind="attr: { 'href' : TaskURL, 'data-id' : TaskID }, text: Name"></a></td>
<td data-bind="text: EstimatedHours || 'No Estimate'"></td>
<td data-bind="text: TotalHours"></td>
<td data-bind="text: DueDate, attr: { 'data-urgency' : $root.dateMagnitude(daysDifference) }"></td>
<td data-bind="attr: {'data-priority':PriorityID}, html: $root.priorities[PriorityID]"></td>
</tr>
</tbody>
<!-- /ko -->
<!-- ko if: managedTaskList().length === 0 -->
<tbody>
<tr>
<td colspan="6" align="center"><strong>No managed tasks. Try changing your filters!</strong></td>
</tr>
</tbody>
<!-- /ko -->
</table>
</div>
</div>
</div>
<div id="customTime" class="reveal-modal" data-reveal>
<h3>Edit Time Logged</h3>
<div class="row">
<div class="edit-box">
<label for="hours">Hours:</label>
<input type="text" id="hours" name="hours" placeholder="Hours" value="0" maxlength="2" />
</div>
<div class="edit-box">
<label for="minutes">Minutes:</label>
<input type="text" id="minutes" name="minutes" placeholder="Minutes" value="0" maxlength="2" />
</div>
<div class="edit-box">
<label for="seconds">Seconds (I'll assume 0):</label>
<input type="text" id="seconds" name="seconds" placeholder="Seconds (who cares though?)" value="0" maxlength="2" />
</div>
</div>
<div class="row collapse">
<div class="small-4 columns">
<a class="button small secondary expand do-close">Cancel</a>
</div>
<div class="small-4 columns">
<a class="button small success expand do-update">Update Hours</a>
</div>
</div>
</div>
<div id="settingsMenu" class="reveal-modal" data-reveal>
<h3>Settings</h3>
<div class="row collapse">
<div class="small-12 columns">
<input type="checkbox" name="showPending" id="showPending" data-bind="checked:showReviewItems"/>
<label for="showPending">Show items waiting internal review?</label>
</div>
<div class="small-12 columns">
<input type="checkbox" name="showInfinite" id="showInfinite" data-bind="checked:showInfiniteItems"/>
<label for="showInfinite">Show items without end date?</label>
</div>
</div>
<a class="close-reveal-modal">×</a>
</div>
<div id="shortcutMenu" class="reveal-modal" data-reveal>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>Enter</kbd> - Send time</p>
<p><kbd>Space</kbd> - Start/Stop timer</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>F</kbd> - Filter Projects
<p><kbd>F5</kbd> or <kbd>Ctrl/Cmd</kbd> + <kbd>R</kbd> - Refresh projects</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>E</kbd> - Edit timer value</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>V</kbd> - View task in system</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>1-4</kbd> - Switch to Timer/Tasks/Time/States</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>S</kbd> or <kbd>,</kbd> - Settings</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>D</kbd> - Edit Description</p>
<p><kbd>Esc</kbd> - Close Modal/Clear filter text</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>?</kbd> - Show Help</p>
<p class="ver" data-version></p>
<a class="close-reveal-modal">×</a>
</div>
<!-- Libraries -->
<!-- <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/3.0.0/knockout-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
<script src="assets/js/foundation/foundation.js"></script>
<script src="assets/js/foundation/foundation.reveal.js"></script>
<script src="assets/js/foundation/foundation.tooltip.js"></script>
<script src="assets/js/localforage.js"></script>
<script src="assets/js/flipclock.js"></script>
<script src="assets/js/moment.min.js"></script>
<script src="assets/js/pikaday.js"></script> -->
<!-- Custom JS -->
<!-- <script src="assets/js/API.js"></script>
<script src="assets/js/viewmodel.js"></script>
<script src="assets/js/filter.js"></script>
<script src="assets/js/window.js"></script>
<script src="assets/js/updateProjectList.js"></script>
<script src="assets/js/procedural.js"></script>
<script src="assets/js/updateHours.js"></script>
<script src="assets/js/timer.js"></script>
<script src="assets/js/sendTime.js"></script>
<script src="assets/js/timelogs.js"></script>
<script src="assets/js/authorise.js"></script>
<script src="assets/js/reset.js"></script>
<script src="assets/js/key.js"></script>
<script src="assets/js/state.js"></script>
<script src="assets/js/tasks.js"></script> -->
<script src="assets/dist/EasyTimer.min.js"></script>
</body>
</html>