-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
464 lines (413 loc) · 16 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/esvit/ng-table/1.0.0/dist/ng-table.min.css">
<script src="https://cdn.rawgit.com/esvit/ng-table/1.0.0/dist/ng-table.js"></script>
<link data-require="font-awesome@*" data-semver="4.1.0" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" />
<script src="js/underscore-min.js"></script>
<script src="js/app.js"></script>
<script src="js/ng-table.js"></script>
<script src="Controllers/MainController.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/ng-table.min.css">
<style wix-style ng-non-bindable>
.label {
text-align: left;
}
</style>
<script>
// function reserve()
//{
// var para = document.createElement("p");
// var node = document.createTextNode("Table reserved!");
// para.appendChild(node);
// var element = document.getElementById("mySelect");
// while(element.firstChild){
// element.removeChild(element.firstChild);
//}
// if (para.value !="")
// {
// element.appendChild(para);
// }
//}
// function selectChair(id) {
// if (document.getElementById(id).style.backgroundImage.includes('chair'))
// {
// if (document.getElementById(id).style.boxShadow == '') {
// //document.getElementById(id).style.boxShadow = 'inset 0px 0px 0px 3px blue';
// var para = document.createElement("p");
// var node = document.createTextNode(id);
// para.appendChild(node);
// var element = document.getElementById("mySelect");
// if (para.value != "") {
// //element.appendChild(para);
// //selections.push(id);
// }
// }
// else {
// document.getElementById(id).style.boxShadow = '';
// }
// }
// }
</script>
<style>
#myTable th {
border-bottom: 1px solid #d6d6d6;
}
#myTable tr:nth-child(even) {
background: #e9e9e9;
}
#ordersTable{
color: black;
background: white;
}
* {
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
ul {
list-style-type: none;
}
a {
color: #b63b4d;
text-decoration: none;
}
/** =======================
* Contenedor Principal
===========================*/
h1 {
color: #FFF;
font-size: 24px;
font-weight: 400;
text-align: center;
margin-top: 80px;
}
h1 a {
color: #c12c42;
font-size: 16px;
}
.accordion {
width: 100%;
max-width: 360px;
margin: 30px auto 20px;
background: #FFF;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.accordion .link {
cursor: pointer;
display: block;
padding: 15px 15px 15px 42px;
color: rgba(50,150,240,1);
font-size: 14px;
font-weight: 700;
border-bottom: 1px solid #CCC;
position: relative;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.accordion li:last-child .link {
border-bottom: 0;
}
.accordion li i {
position: absolute;
top: 16px;
left: 12px;
font-size: 18px;
color: #595959;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.accordion li i.fa-chevron-down {
right: 12px;
left: auto;
font-size: 16px;
}
.accordion li.open .link {
color: rgba(50,150,240,.5);
}
.accordion li.open i {
color: #b63b4d;
}
.accordion li.open i.fa-chevron-down {
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.accordion li.default .submenu {display: block;}
/**
* Submenu
-----------------------------*/
.submenu {
display: none;
background: rgba(50,150,240,1);
font-size: 14px;
}
.submenu a {
display: block;
text-decoration: none;
color: #d9d9d9;
padding: 12px;
padding-left: 42px;
-webkit-transition: all 0.25s ease;
-o-transition: all 0.25s ease;
transition: all 0.25s ease;
}
.submenu a:hover {
background: rgba(60,200,240,1);
color: #FFF;
}
</style>
<script>
$(document).ready(function () {
(function ($) {
$('#filter').keyup(function () {
var rex = new RegExp($(this).val(), 'i');
$('.searchable tr').hide();
$('.searchable tr').filter(function () {
return rex.test($(this).text());
}).show();
})
}(jQuery));
});
$(function() {
var Accordion = function(el, multiple) {
this.el = el || {};
this.multiple = multiple || false;
// Variables privadas
var links = this.el.find('.link');
// Evento
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
}
Accordion.prototype.dropdown = function(e) {
var $el = e.data.el;
$this = $(this),
$next = $this.next();
$next.slideToggle();
$this.parent().toggleClass('open');
if (!e.data.multiple) {
$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
};
}
var accordion = new Accordion($('#accordion'), false);
});
</script>
</head>
<body data-ng-app="wixRestClientApp">
<div>
I am admin<input type="checkbox" id="isAdmin" value="true" ng-model="isAdmin"> <br>
</div>
<div class="outerContainer container" data-ng-controller="MainController">
<div id="userContainer" class="col-xs-5" ng-hide="isAdmin">
<form action="#someurl" id="mapLoader">
<p>
<h2 class="">Welcome to Restaurant Reservations!</h2>
</p>
<div class="row">
<label for="dateInput" class="col-xs-4">
<h4>Enter a date:</h4>
</label>
<div id="dateInput" class="input-field col-xs-8">
<input class="form-control" type="date" id="dinnerDate" max="2017-12-31">
</div>
</div>
<div class="row">
<label for="timeInput" class="col-xs-4"><h4>Enter time:</h4></label>
<div id="timeInput" class="input-field col-xs-8">
<input class="form-control" id="dinnerStart" type="time">
</div>
</div>
<div class="row">
<label for="timeInput" class="col-xs-4"><h4>Enter end time:</h4></label>
<div id="timeInput" class="input-field col-xs-8">
<input class="form-control" id="dinnerEnd" type="time">
</div>
</div>
<div class="row" ng-hide="false">
<label for="timeInput" class="col-xs-4"><h4>Load map:</h4></label>
<div id="Load" class="input-field col-xs-8">
<input type="button" value="Load" class="btn btn-default
id="loadButton" ng-click="GetGridByRestaurantId(10)" col-xs-4">
</div>
</div>
</form>
<br />
<form action="#someurl" id="Reservation">
<div class="row">
<label for="timeInput" class="col-xs-4"><h4>Order:</h4></label>
<div id="nameInput" class="input-field col-xs-8">
<input id="nametxt"class="form-control" type="text" ng-model="yourName" placeholder="Enter a name here">
</div>
</div>
<div class="row">
<label for="quantityInput" class="col-xs-4"><h4>Quantity:</h4></label>
<div id="quantityInput" class="input-field col-xs-8">
<input id=quantitytxt class="form-control" type="number" name="quantity" min="1" max="12">
</div>
</div>
<div class="row">
<label for="PhoneInput" class="col-xs-4"><h4>Phone:</h4></label>
<div id="PhoneInput" class="input-field col-xs-8">
<input id="phonetxt" class="form-control">
</div>
</div>
<form action="#someurl" id="mySelect" class="col-xs-12">
<div class="row col-xs-12">
<label for="lblReserve" class="pull-left"><h4>Reserve:</h4></label>
</div>
<div id="Reserve" class="input-field row">
<input type="button" onclick="reserve()" value="Reserve" class="btn btn-default col-xs-4 col-xs-push-4" ng-click="CreateNewOrder('1','1','daniel','050','3','4546444')"><br>
<!--<form action="#someurl" id="mySelect" class="col-xs-12" ></form><br>-->
</div>
</form>
</div>
<div id="draggableContainer" class="col-xs-5" ng-show="isAdmin && isEdit">
<form action="#someurl" id="mapLoader">
<p>
<h2 class="">Map Builder:</h2>
</p>
<ul id="accordion" class="accordion">
<li class="default open" data-ng-repeat="itemArray in draggableArray">
<div class="link"><i class="fa fa-code"></i>{{itemArray.key}}<i class="fa fa-chevron-down"></i></div>
<ul class="submenu">
<div data-ng-repeat="item in itemArray.value">
<li><a href="#"><div dragme bgcolor="#fdcca0" left="20" data-name="{{item.name}}" backgroundimage="{{item.img}}" myindex="$index"></div></a></li>
</div>
</ul>
</li>
</form>
<div style="color:black">
<div class="row">
<label for="timeInput" class="col-xs-4"><h4>Map date:</h4></label>
<div id="xxx" class="input-field col-xs-8">
<input ng-model="mapSaveDate" id="mapSaveDate" class="form-control" type="date" ng-Change="UpdateGrid(10)">
</div>
</div>
<label>Length</label>
<select ng-model="length" ng-options="length for length in sizes" />
</select>
<label>Width</label>
<select ng-model="width" ng-options="width for width in sizes" >
</select>
</div>
<div class="row">
<div id="Save" style="color:black" class="input-field col-xs-4 col-xs-push-5 row">
<input type="button" value="Clear Map" class="btn btn-default" ng-click="ClearMap();"><br>
</div><br>
</div>
<div class="row">
<div id="Save" style="color:black" class="input-field col-xs-4 col-xs-push-5 row">
<input type="button" value="Save" class="btn btn-default" ng-click="CreateNewGrid('10',0, 2, 'cool grid', 'true', length, width)"><br>
</div><br>
</div>
<div class="row">
<div id="Exit" class="input-field col-xs-4 col-xs-push-5 row" ng-click="isEdit = false; ClearMap();">
<input type="button" value="Exit" class="btn btn-default"><br>
</div>
</div>
</div>
<div id="userContainer" class="col-xs-5" ng-show="isAdmin && !isEdit">
<form action="#someurl" id="mapLoader">
<p>
<h2 class="">Map Builder:</h2>
</p>
<ul id="accordion" class="accordion">
<li>
<div class="link">Manager</div>
<ul class="submenu"></ul>
</li>
<li>
<div class="link" ng-click="isEdit = true;ClearMap();isOrders = false">Edit</div>
<ul class="submenu"></ul>
</li>
<li>
<div class="link" ng-click="isOrders = true">Order</div>
<ul class="submenu"></ul>
</li>
<li>
<div class="link">Statistics</div>
<ul class="submenu">
</ul>
</li>
</ul>
</form>
</div>
<div id="ordersTable" class="input-group" ng-show="isOrders">
Orders<br />
<input id="orderDate" type="date" ng-model="mysearchOrderDate" placeholder="Search For Grid Id...">
<button id="checkGridRetrievel" ng-click="GetOrdersByGridAndDate()">Retrieve Orders</button><br>
<input type="button" value="Exit" ng-click="isOrders=false;" class="btn btn-default"><br>
<input id="filter" type="text" class="form-control" placeholder="Type search here...">
<table ng-table="tableParams" class="table" show-filter="true">
<thead>
<tr>
<th>Date</th>
<th>Table Number</th>
<th>From Time</th>
<th>To Time</th>
<th>Num Of People</th>
<th>Customer Name</th>
<th>Customer Phone</th>
</tr>
</thead>
<tbody class="searchable">
<tr ng-repeat="x in orders">
<td>
{{x.Date}}
</td>
<td >
{{x.TableNumber}}
</td>
<td>
{{x.FromTime}}
</td>
<td >
{{x.ToTime}}
</td>
<td>
{{x.NumOfPeople}}
</td>
<td >
{{x.CustomerName}}
</td>
<td>
{{x.CustomerPhone}}
</td>
</tr>
</tbody>
</table>
<div class="row">
<label for="dateInputClustet" class="col-xs-4">
<h4>Enter a date for cluster:</h4>
</label>
<div id="dateInputClustet" class="input-field col-xs-8">
<input class="form-control" type="date" id="clusterDate" max="2017-12-31">
<button id="GetCluster" ng-click="GetCluster(10)">Cluster</button>
</div>
<label id="resultClsterString" class="col-xs-4">Result Here</label>
</div>
</div>
<div id="droppableContainer" class="col-xs-7" ng-show="!isOrders">
<div class='col-lg-12' ng-if='isRouteLoading' style="z-index: -1"><h1>Loading <i class='fa fa-cog fa-spin'></i></h1></div>
<table>
<tr data-ng-repeat="row in cells track by $index">
<td data-ng-repeat="cell in row track by $index">
<div id="{{cell.id}}" clickme dropme data-name="{{cell.img}}" ng-model="cell" backgroundShadow="{{cell.boxShadow}}" backgroundimage="{{cell.img}}"></div>
</td>
</tr>
</table>
</div>
</div>
</body><!--body-->
</html>