-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
118 lines (99 loc) · 3.15 KB
/
main.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
<!DOCTYPE html>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<html>
<style>
table,
td, th {
width: 4rem;
height: 2rem;
border: 1px solid #ccc;
text-align: center;
}
th {
background: lightblue;
border-color: white;
}
.selected{
color: red;
font-weight: bold;
}
table tr {
cursor: pointer;
transition: all .25s ease-in-out;
}
table tr:hover {
background-color: #ddd;
}
</style>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Receipt</title>
</head>
<body>
<div>
<h3>Nowa pozycja</h3>
<form id="add" class="form-group" action="#">
<div>
<label for="name">Nazwa</label>
<input type="text" id="name">
<small></small>
</div>
<div>
<label for="quantity">Ilość</label>
<input type="number" id="quantity">
<small></small>
</div>
<div>
<label for="price">Cena</label>
<input type="number" id="price" step='0.01' value='0.00' placeholder='0.00'>
<small></small>
</div>
<input type="submit" value="Dodaj" class="btn btn-primary" id="Add_button" onclick="buttonSubmit()">
<button onclick="editRow()" class="btn btn-warning">Edit Row</button><br><br>
<h4 id="paragon">Paragon</h4>
</form>
</div>
<table id="products" class="table table-striped">
<thead>
<caption style="text-align: center; ">Razem</caption>
<caption style="text-align: center;" id="costSummary-sum"></caption>
<tr>
<th>LP</th>
<th>NAZWA</th>
<th>ILOŚĆ</th>
<th>CENA</th>
<th>SUMA</th>
<th>Usuń</th>
</tr>
</thead>
<tbody id="tbody-products">
<tr>
<td>1</td>
<td>Jabłka</td>
<td>1,5</td>
<td>4,90zł</td>
<td>7,35zł</td>
<td>
<input type="submit" value="Usuń" id="Delete_button" class="btn btn-danger" onclick="deleteRow(0)"></td>
</td>
</tr>
<tr>
<td>2</td>
<td>Bułka</td>
<td>5</td>
<td>0.49zł</td>
<td>2,45zł</td>
<td>
<input type="submit" value="Usuń" id="Delete_button" class="btn btn-danger" onclick="deleteRow(1)"></td>
</td>
</td>
</tr>
</tbody>
</table>
<button onclick="upNdown('up');"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"/> </svg></button>
<button onclick="upNdown('down');"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"/> </svg> </button>
<script src="script.js">
</script>
</body>
</html>