-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.html
83 lines (80 loc) · 3.11 KB
/
task.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
<!DOCTYPE HTML>
<html>
<head>
<!-- Mohamed Hassan -->
<meta charset="UTF-8">
<!-- plugins -->
<link rel="stylesheet" href="plugins/bootstrap.css" />
<link rel="stylesheet" href="styles/style.css" />
<script type="text/javascript" src="plugins/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="plugins/bootstrap.min.js"></script>
<!-- my scripts -->
<script type="text/javascript" src="scripts/dateTimeHelper.js"></script>
<script type="text/javascript" src="scripts/tasks.js"></script>
<script>
$(document).ready(function () {
var id = window.location.href.split('?')[1].replace('id=', '');
var task = findTask(id);
if (task != null) {
switch (task.status) {
case status_enum.not_start:
document.getElementById('timer').appendChild(startbtn(null, id));
break;
case status_enum.working:
document.getElementById('timer').innerHTML = task.current_minutes + ":" + task.current_seconds;
interval_all(task);
break;
case status_enum.finished:
document.getElementById('timer').appendChild(finishedbtn());
break;
};
document.getElementById('taskName').innerHTML = task.name;
document.getElementById('taskDate').innerHTML = task.date;
document.getElementById('taskPeriod').innerHTML = task.period;
}
});
</script>
</head>
<body>
<div class="container-fluid main-dv main-dv-sm">
<a href="index.html" class="btn btn-warning">Back</a>
<div class="row">
<div class="col-xs-3"></div>
<div class="col-xs-9">
<hr />
<div class="dv-timer text-center">
<b>
<h1 id="timer" class="timer-text"></h1>
</b>
</div>
</div>
</div>
<br/>
<div class="row" style="margin: 20px;">
<div class="col-xs-12">
<table class="table table-bordered table-hover table-responsive">
<thead>
<tr>
<th>Task</th>
<th>Date</th>
<th>Period</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<h3 id="taskName"></h3>
</td>
<td>
<h3 id="taskDate"></h3>
</td>
<td>
<h3 id="taskPeriod"></h3>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>