-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlist.html
93 lines (58 loc) · 2.64 KB
/
list.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
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-theme.css">
<!-- Latest compiled and minified JavaScript -->
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- List !-->
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">BleeFree</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class=""><a href="index.html">Add</a></li>
<li class="active"><a href="#about">View</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<br><br><br>
<h2>Task List</h2>
<table id="table" class="table">
<th>Ward/Bed</th>
<th>Task</th>
</table>
</div>
<script type="text/javascript">
$( document ).ready(function() {
$.getJSON("http://powerful-dawn-95782.herokuapp.com/job/read",
function(data){
for (i = 0; i < data.jobs.length; i++)
{
$("#table").append("<tr><td>"+
data.jobs[i].ward + " / " + data.jobs[i].patient_id +
"</td><td>"+
data.jobs[i].creator_comment +
"</td><td><form action='https://powerful-dawn-95782.herokuapp.com/job/update/"+ data.jobs[i].id +"' method='post'><input type='text' name='done' value='true' hidden='true'><button class='btn btn-success'>Done</button></form></td></tr>"
);
}
});
});
</script>
</body>
</html>