-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrack.html
93 lines (81 loc) · 4.14 KB
/
track.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
<!DOCTYPE html>
<html>
<head>
<title>Project Time Tracker</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="jscript.js"></script>
<!-- to make responsive -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- include bootstrap css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" />
<!-- include jquery and bootstrap js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/js/bootstrap.min.js"></script>
<!-- include sweetalert for displaying dialog messages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script>
</head>
<body>
<div class="container" style="margin-top: 50px;">
<!-- button to add task -->
<div class="row" style="margin-bottom: 50px;">
<div class="col-md-12">
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#addTaskModal">Add Task</button>
<!-- form to delete project -->
<form method="POST" onsubmit="return taskObj.deleteProject(this);" style="display: contents;">
<select name="project" class="form-control" style="display: initial; width: 200px; margin-left: 5px; margin-right: 5px;" id="form-task-hour-calculator-all-projects"></select>
<input type="submit" class="btn btn-danger" value="Delete Project">
</form>
</div>
</div>
<!-- show all tasks -->
<table class="table">
<caption class="text-center">All Tasks</caption>
<tr>
<th>Task</th>
<th>Project</th>
<th>Status</th>
<th>Duration</th>
<th>Date</th>
<th>Action</th>
</tr>
<tbody id="all-tasks"></tbody>
</table>
</div>
<!-- modal to add project and task -->
<div class="modal fade" id="addTaskModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Add Task</h5>
<button class="close" type="button" data-dismiss="modal">x</button>
</div>
<div class="modal-body">
<form method="POST" onsubmit="return taskObj.addTask(this);" id="form-task-hour-calculator">
<!-- select project from already created -->
<div class="form-group">
<label>Project</label>
<select name="project" id="add-task-project" class="form-control" required></select>
</div>
<!-- create new project -->
<div class="form-group">
<label>New Project</label>
<input type="text" name="new_project" id="add-project" class="form-control" placeholder="Project Name">
<button type="button" onclick="taskObj.addProject();" class="btn btn-primary" style="margin-top: 10px;">Add Project</button>
</div>
<!-- enter task -->
<div class="form-group">
<label>Task</label>
<input type="text" name="task" class="form-control" placeholder="What are you going to do ?" required />
</div>
</form>
</div>
<!-- form submit button -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" form="form-task-hour-calculator" class="btn btn-primary">Add Task</button>
</div>
</div>
</div>
</div>
</body>
</html>