-
Notifications
You must be signed in to change notification settings - Fork 0
/
bank.html
124 lines (84 loc) · 2.55 KB
/
bank.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
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<style>
.hidden{
display:none;
}
.result{
max-width:80px;
}
</style>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<div class="card card-body">
<!-- Form Wrapper & Button -->
<button class="btn btn-sm btn-primary" id="add-test">Add Test</button>
<div class="form-wrapper hidden">
<select class="form-control" id="test-name">
<option>----------</option>
<option>Flash Point</option>
<option>Water</option>
<option>Distillation</option>
</select>
<input class="form-control" type="text" id="test-result">
<button class="btn btn-sm btn-info" id="create-test">Add</button>
</div>
<!-- Data Table -->
<table class="table table-dark">
<thead>
<tr>
<th scope="col">Test</th>
<th scope="col">Result</th>
</tr>
</thead>
<tbody id="tests-table">
</tbody>
</table>
</div>
</div>
<div class="col-md-4"></div>
</div>
<script>
$('#add-test').on('click', function(){
})
$('#test-result').on('keyup', function(){
})
$('#test-name').on('change', function(){
})
$('#create-test').on('click', function(){
})
var tests = [
{'name':'Distillation 50%', 'id':'1', 'result':"43"},
{'name':'Flash Point', 'id':'2', 'result':"61"},
{'name':'Water By Karl Fischer', 'id':'3', 'result':"24"},
]
for (var i in tests){
addRow(tests[i])
}
function addRow(obj){
var row = `<tr scope="row" class="test-row-${obj.id}">
<td>${obj.name}</td>
<td>${obj.result}</td>
<td>
<button class="btn btn-sm btn-danger">Delete</button>
<button class="btn btn-sm btn-info">Save</button>
<!--
<button class="btn btn-sm btn-danger">Cancel</button>
<button class="btn btn-sm btn-primary">Confirm</button>
-->
</td>
</tr>`
$('#tests-table').append(row)
}
function editResult(){
}
function saveUpdate(){
}
function deleteTest(){
}
function cancelDeletion(){
}
function confirmDeletion(){
}
</script>