-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainMenu.html
515 lines (477 loc) · 21 KB
/
MainMenu.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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Css style -->
<link rel="stylesheet" href="Style.css">
<!-- localStorage API -->
<script src="store.min.js"></script>
<!-- Bar Logic -->
<script src="Logic.js"></script>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script>
$(document).ready (function(){
$("#success-alert").hide();
$("#success-alert-state").hide();
$("#delete-alert-state").hide();
});
$(window).load(function(){
if (store.get('STATEOPEN') == 1) {
$('#stateMenu').modal('show');
store.set('STATEOPEN', 0);
}
});
function pageLoad() {
if(store.get("once") == undefined) doOnceFood();
getBadge();
updateMainMenuCart();
updateCartList();
updateCart();
updateStateCard();
}
//store.clear();
window.onload = pageLoad;
document.getElementById('cartTable').addEventListener('click',tableclick,false);
</script>
<!-- STYLE OF THE COMPONENTS -->
<style>
body { padding-top: 70px;
font-family: 'Roboto';
}
p { font-size:25px; }
.alignBtn{
position: relative;
height: auto;
top: 5px;
bottom: 2px;
}
.jumbotron.vertical-center {
margin-bottom: 0; /* Remove the default bottom margin of .jumbotron */
background-color: white;
}
</style>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<button onclick="window.history.back()" type="button" class="btn btn-default btn-lg alignBtn" aria-label="Left Align">
<span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>
</button>
<button onclick="location.href='MainMenu.html'" type="button" class="btn btn-default btn-lg alignBtn disabled" aria-label="Left Align">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</button>
</div>
<div class="col-sm-5 col-md-5" >
<ul class="nav navbar-nav navbar-left" role="tablist">
<button data-toggle="modal" data-target="#helpModal" type="button" class="btn btn-default btn-lg alignBtn" aria-label="Left Align">
<span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span>
</button>
</ul>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse row" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right" role="tablist">
<div class="col-xs-4">
<button onClick="updateStateCard()" type="button" class="btn btn-default btn-lg alignBtn" aria-label="Left Align" data-toggle="modal" data-target="#stateMenu">
<span class="glyphicon glyphicon-time" aria-hidden="true"></span>
<span>Estado</span>
</button>
</div>
<div class="col-xs-3">
<button onclick="updateCart();"type="button" class="btn btn-default btn-lg alignBtn" aria-label="Left Align" data-toggle="modal" data-target="#shoopingCart">
<span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
<span id="shopping-badge"class="badge">0</span>
</button>
</div>
<div class="col-xs-4" style="top:9px; left:10px">
<p class="text-right lead final-price" style="font-size:180%; padding-top:0px;">€ 0.0</p>
</div>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div>
<h2 class="text-center"> Categorias </h2>
</div>
<body>
<div clas="container-fluid ">
<div class="row jumbotron vertical-center" >
<div class="col-xs-4">
<div class="thumbnail card-5">
<a href="FoodItemMenu.html">
<img src="Category/food.jpg" alt="Food" class="img-rounded">
</a>
<div class="caption">
<h3 class="text-center">Comida</h3>
</div>
</div>
</div>
<div class="col-xs-4 ">
<div class="thumbnail card-5">
<a href="DrinkItemMenu.html">
<img src="Category/drinks.jpg" alt="Drinks" class="img-rounded">
</a>
<div class="caption">
<h3 class="text-center">Bebida</h3>
</div>
</div>
</div>
<div class="col-xs-4 ">
<div class="thumbnail card-5">
<a href="CafeItemMenu.html">
<img src="Category/cafe.jpg" alt="Cafe" class="img-rounded">
</a>
<div class="caption">
<h3 class="text-center">Café</h3>
</div>
</div>
</div>
</div>
</div>
</body>
<!-- POPUP MENU -->
<div class="modal fade" id="shoopingCart">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Carrinho de Compras</h2>
</div>
<div class="modal-body">
<table class="table table-responsive">
<thead>
<tr>
<th>Item</th>
<th>Quantidade</th>
<th>Preço Und.</th>
<th>Remover</th>
</tr>
</thead>
<tbody id="cartTable">
</tbody>
</table>
<p class="text-right total-price">Total: € 0.00</p>
</div>
<div class="alert alert-success" id="delete-alert-state">
<button type="button" class="close" data-dismiss="alert">x</button>
<p class="text-center"><strong>Item removido com sucesso</strong></p>
</div>
<div class="modal-footer">
<p class="text-center">
<a class="btn btn-danger btn-lg" data-dismiss="modal">
<span class="glyphicon glyphicon-arrow-left"></span> Retroceder
</a>
<a class="btn btn-warning btn-lg payButton" data-toggle="modal" data-target="#payNow">
<span class="glyphicon glyphicon-euro"></span> Pagar
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Shoping cart table items -->
<div style="display:none">
<button value="Minus" onClick="DecrementQuantity(this)" id="minus-button" type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-minus"></span>
</button>
<a style="text-decoration: none; margin:10px" id="qnt">1</a>
<button value="Plus" onClick="IncrementQuantity(this)" id="plus-button" type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-plus"></span>
</button>
<button value="Delete" onclick="ActionConfirmed(this)" id="trash-button" type="button" class="btn btn-danger btn-lg">
<span class="glyphicon glyphicon-trash"></span>
</button>
<button value="AddToCart" onclick="addCartFromState(this)" id="add-button" type="button" class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-shopping-cart"></span> Adicionar
</button>
</div>
<!-- Shoping cart table items END -->
<div class="modal fade" id="stateMenu">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Estado dos Pedidos</h2>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th>Item</th>
<th>Quantidade</th>
<th>Preço Und.</th>
<th>Estado<th>
</tr>
</thead>
<tbody id="stateTable">
</tbody>
</table>
<p class="text-right processing-price">Total: € 0.0</p>
</div>
<div class="modal-footer">
<p class="text-center">
<a class="btn btn-danger btn-lg" data-dismiss="modal">
<span class="glyphicon glyphicon-arrow-left"></span> Retroceder
</a>
<a class="btn btn-info btn-lg" onClick="simulateProcessing()">
<span class="glyphicon glyphicon-ok"></span> Simular Processamento
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="payNow">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Pagamento</h2>
</div>
<div class="modal-body">
<p class="text-center">Por favor, escolha um método de pagamento</p>
<p class="text-center final-price">Total: € 0.00</p>
</div>
<div class="modal-footer">
<p class="text-center">
<a onclick="cashPayInfo()" class="btn btn-success btn-lg" data-toggle="modal" data-target="#cashPay">
<span class="glyphicon glyphicon-euro"></span> Em Dinheiro
</a>
<a onclick="cashPayInfo()" class="btn btn-success btn-lg" data-toggle="modal" data-target="#creditCardPay">
<span class="glyphicon glyphicon-credit-card"></span> Cartão de Crédito
</a>
</p>
<p class="text-center">
<a class="btn btn-danger btn-lg" data-dismiss="modal">
<span class="glyphicon glyphicon-arrow-left"></span> Retroceder
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="cashPay">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Pagamento em Dinheiro</h2>
</div>
<div class="modal-body">
<p class="text-center"> Por favor, introduza a quantia indicada</p>
<p class="text-center final-price">Total: € 0.00</p>
<p class="text-center">Introduzido: € 0.00</p>
</div>
<div class="modal-footer">
<p class="text-center">
<a class="btn btn-danger btn-lg" data-dismiss="modal" >
<span class="glyphicon glyphicon-arrow-left"></span> Alterar Método de Pagamento
</a>
<a onClick = "paymentDone()" class="btn btn-info btn-lg" >
<span class="glyphicon glyphicon-ok"></span> Simular Pagamento
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="creditCardPay">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Pagamento com Cartão de Crédito</h2>
</div>
<div class="modal-body">
<p class="text-center"> Por favor, introduza o seu cartão de crédito no lugar indicado na mesa.</p>
<p class="text-center final-price">Total: € 0.00</p>
</div>
<div class="modal-footer">
<p class="text-center">
<a class="btn btn-danger btn-lg" data-dismiss="modal" >
<span class="glyphicon glyphicon-arrow-left"></span> Alterar Método de Pagamento
</a>
<a class="btn btn-info btn-lg" data-toggle="modal" data-target="#keyPad">
<span class="glyphicon glyphicon-ok"></span> Simular Pagamento
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="keyPad">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Multibanco</h2>
</div>
<div class="modal-body">
<div class="form-group wrapper">
<input id="PIN"type="password" class="form-control" placeholder="PIN">
</div>
<div style="text-align: center">
<div class="row">
<button value="1" onclick="addPin(this.value)"type="button" class="btn btn-info btn-lg keypad btnSize">
<span>1</span>
</button>
<button value="2" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg keypad btnSize">
<span>2</span>
</button>
<button value="3" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg keypad btnSize">
<span>3</span>
</button>
</div>
<div class="row">
<button value="4" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>4</span>
</button>
<button value="5" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>5</span>
</button>
<button value="6" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>6</span>
</button>
</div>
<div class="row">
<button value="7" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>7</span>
</button>
<button value="8" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>8</span>
</button>
<button value="9" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>9</span>
</button>
</div>
<div class="row">
<button onClick="goBackPIN()"value="7" type="button" class="btn btn-danger btn-lg btnSize">
<span class="glyphicon glyphicon-menu-left"></span>
</button>
<button value="0" onclick="addPin(this.value)" type="button" class="btn btn-info btn-lg btnSize">
<span>0</span>
</button>
<button onClick = "checkPIN()" value="9" type="button" class="btn btn-success btn-lg btnSize">
<span class="glyphicon glyphicon-ok"></span>
</button>
</div>
</div>
</div>
<div class="modal-footer">
<p class="text-center">
<a class="btn btn-danger btn-lg" data-dismiss="modal" >
<span class="glyphicon glyphicon-arrow-left"></span> Alterar Método de Pagamento
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal -->
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title text-center" id="myModalLabel">Remover Item</h4>
</div>
<div class="modal-body">
<p class="text-center">Tem a certeza que pretende remover este item?</p>
</div>
<div class="modal-footer">
<p class="text-center">
<a class="btn btn-default btn-lg" data-dismiss="modal">
<span class="glyphicon glyphicon-remove" data-dismiss="modal"></span> Cancelar
</a>
<button value="Confirm" onClick="ActionConfirmed(this)" id= "Confirm" class="btn btn-danger btn-lg">
<span class="glyphicon glyphicon-trash"></span> Remover
</button>
</p>
</div>
</div>
</div>
</div>
<div class="modal fade" id ="processOrder">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center"> Pedido efectuado com sucesso</h2>
</div>
<div class="modal-body">
<p>O seu pedido está a ser processado. Para mais informações sobre o seu pedido, por favor consulte o menu do estado do pedido, na barra de navegação.</p>
</div>
<div class="modal-footer">
<p class="text-center">
<a onclick="closeModals(1)" class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-ok"></span> Continuar
</a>
<a onclick="closeModals(2)" class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-time"></span> Estado do Pedido
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id ="helpModal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h2 class="modal-title text-center">Centro de Ajuda</h2>
</div>
<div class="modal-body">
<h2 class="text-center">Menus</h2>
<h4><strong style="color:green">Menu Incial: </strong>Menu incial apresenta 3 diferentes categorias (Comida, Bebida e Café).</h4>
<h4><strong style="color:green">Menu de Categria: </strong>Cada menu da categoria apresenta itens pertencetes à sua categoria.</h4>
<h4><strong style="color:green">Carrinho de Compras: </strong>Carrinho de compras permite visualizar/editar os seus pedidos.</h4>
<h4><strong style="color:green">Estado do Pedido: </strong>Permite visualizar a informação relativa ao estado actual do pedido.
Existem dois estados em que o pedido pode estar: <strong>'Pedido em preparação'</strong> e <strong>'Pedido entregue'</strong>.</h4>
<br></br>
<h2 class="text-center">Pagamento</h2>
<h4><strong style="color:green">Métodos de Pagamento: </strong>Existem 2 métodos de pagamento: <strong>'Em dinheiro'</strong> e com <strong>'Cartão de crédito'</strong>.</h4>
<h4><strong style="color:green">Moedas aceites: </strong> 5cent, 10cent, 20cent, 50cent, 1 Euro, 2 Euros. </h4>
<h4><strong style="color:green">Cartão de crédito aceite: </strong> VISA e MasterCard. </h4>
<br></br>
<h2 class="text-center">Efectuar pedido</h2>
<h4> Para efectuar pedido, é necessário escolher os itens desejados e em seguida, entrar no carrinho de compras para proceder como pagamento.
Uma vez que o pagamento esteja concluído, o seu pedido começará a ser preparado. Para consultar o estado do seu pedido, basta carregar no botão 'Estado' na barra de navegação.</h4>
</div>
<div class="modal-footer">
<p class="text-center">
<a data-dismiss="modal" class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-ok"></span> Continuar
</a>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</html>