-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.html
253 lines (217 loc) · 8.3 KB
/
app.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" href="css/skeleton.css"> -->
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/index.js"></script>
<title>Centre Elaoula</title>
</head>
<body>
<header>
</header>
<div class="tools">
<div class="statistic-box">
<div class="box">
<h3><i class="icon-creditcards"></i></h3><span id="res">0</span><span></span>
</div>
<div class="box">
<h3><i class="icon-users"></i></h3><span id="cunt">0</span><span></span>
</div>
<div class="box">
<h3><i class="icon-qrcode"></i></h3><span id="codeStudent"></span><span></span>
</div>
<div class="box">
<h3><i class="icon-layers1"></i></h3><span id="countLevel">0</span>
<select id="selectLevel">
<option value="choose Level pluse" selected disabled></option>
<option value="1As">1As</option>
<option value="2As">2As</option>
<option value="3As">3As</option>
<option value="4As">4As</option>
<option value="5C">5C</option>
<option value="6C">6C</option>
<option value="7C">7C</option>
<option value="5D">5D</option>
<option value="6D">6D</option>
<option value="7D">7D</option>
</select>
</div>
</div>
<div class="search-box" id="search">
<span><i class="icon-search1 i-search"></i></span>
<input type="text" id="filterInput" placeholder="Enter value to filter">
</div>
</div>
<!--======================= Start Container Div =========================-->
<div class="container">
<!--======================= Start Left ========================================-->
<!--======================= End Left ========================================-->
<!--======================= Start Center ===============================-->
<div class="center">
<table class="u-full-width" id="dataTable">
<thead>
<tr>
<th>CodeRim</th>
<th>Name</th>
<th>Level</th>
<th>Date</th>
<th>New</th>
<th>Price</th>
<th>Control</th>
</tr>
</thead>
<tbody id="tablebody">
</tbody>
</table>
<span class="data-nul" id="dataNul"></span>
</div>
<!--======================= End Center =================================-->
<!--======================= Start Right ================================-->
<!-- <div class="right">
</div> -->
<!--======================= End Right ==================================-->
</div>
<!--======================= End Container Div ==========================-->
<!--======================= Start Form Add New Student ================-->
<button class="open-button btn" onclick="openForm()"><i class="icon-user-plus open"></i></button>
<div class="form-popup" id="popupForm">
<button class="close-button btn" onclick="closeForm()"><i class="icon-x close"></i></button>
<form class="row">
<div class="columns">
<i class="icon-lock"></i>
<input class="u-full-width" placeholder="Code-Rim" id="code" type="text">
</div>
<div class="columns">
<i class="icon-user"></i>
<input class="u-full-width" placeholder="Name" id="name" type="text">
</div>
<div class="columns">
<i class="icon-layers1"></i>
<select name="level" id="level">
<option value="choose Level pluse" selected disabled>level</option>
<option value="1As">1As</option>
<option value="2As">2As</option>
<option value="3As">3As</option>
<option value="4As">4As</option>
<option value="5C">5C</option>
<option value="6C">6C</option>
<option value="7C">7C</option>
<option value="5D">5D</option>
<option value="6D">6D</option>
<option value="7D">7D</option>
</select>
</div>
<div class="columns">
<i class="icon-calendar"></i>
<input class="u-full-width" placeholder="Date of register" id="date" type="date">
</div>
<div class="columns">
<i class="icon-creditcards"></i>
<input class="u-full-width" placeholder="Price" id="price" type="number" min="0">
</div>
<!-- <input class="btn add" value="Add" id="add" type="button"> -->
<div class="diff">
<button class="btn add" onclick="closeForm()" id="add"><i class="icon-upload-cloud insert"></i></button>
</div>
</form>
</div>
<!--======================= End Form Add New Student ====================-->
<!--======================= Start Form Edit Price =======================-->
<div class="edit-price" id="editPrice">
<button class="close-button btn" onclick="closeEditPrice()"><i class="icon-x close"></i></button>
<div class="infoStudent">
<div class="codeinfo">
<i class="icon-qrcode"></i>
<span></span>
<code id="IDx">Error code !</code>
</div>
<table>
<thead>
<th><code>Nam</code></th>
<th><code>Level</code></th>
<th><code>Time</code></th>
<th><code>Old Price</code></th>
</thead>
<tbody>
<tr>
<td><code id="nameStudent">?</code></td>
<td><code id="levelStudent">?</code></td>
<td><code id="time">?</code></td>
<td><code id="oldPrice">?</code></td>
</tr>
</tbody>
</table>
</div>
<div class="entry">
<input type="number" id="newPrice" min="0" placeholder="New Price" value="0">
<button class="updateP" id="updateP"><i class="icon-check insert"></i></button>
</div>
</div>
<!--======================= End Form Edit Price =========================-->
<script>
function closeEditPrice(){
document.getElementById("editPrice").style.display = "none";
}
function closeSearch(){
document.getElementById("search").style.display = "none";
}
function openSearch(){
document.getElementById("search").style.display = "flex";
}
function openEditPrice(){
document.getElementById("editPrice").style.display = "block";
}
function openForm() {
document.getElementById("popupForm").style.display = "block";
}
function closeForm() {
document.getElementById("popupForm").style.display = "none";
}
document.addEventListener("keydown",(e)=>{
if (e.ctrlKey && e.shiftKey) {
openForm();
}
if (e.ctrlKey && e.altKey) {
closeForm();
closeEditPrice();
closeSearch()
}
if (e.ctrlKey && e.key == 'e') {
openEditPrice();
}
if (e.ctrlKey && e.key == 'f') {
openSearch()
}
});
function filterTable() {
// Get input element and filter value
var input = document.getElementById("filterInput");
var filter = input.value.toUpperCase();
// Get the table and table rows
var table = document.getElementById("dataTable");
var rows = table.getElementsByTagName("tr");
// Loop through all rows, hide those that don't match the filter
for (var i = 1; i < rows.length; i++) {
var cells = rows[i].getElementsByTagName("td");
var shouldHide = true;
// Loop through all cells in the current row
for (var j = 0; j < cells.length; j++) {
var cellValue = cells[j].textContent || cells[j].innerText;
// Check if the cell value matches the filter
if (cellValue.toUpperCase().indexOf(filter) > -1) {
shouldHide = false;
break;
}
}
// Set the display property based on the filter result
rows[i].style.display = shouldHide ? "none" : "";
}
}
// Attach the filter function to the input element's 'input' event
var inputElement = document.getElementById("filterInput");
inputElement.addEventListener("input", filterTable);
</script>
</body>
</html>