-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaeroplane.html
69 lines (66 loc) · 2.23 KB
/
aeroplane.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css">
<script type="text/javascript" src="seats.js"></script>
<script type="text/javascript" src="Queue.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
</script>
<title> Aeroplane </title>
<script >
function getParameterByName(name, url)
{
if (!url) {
url = window.location.href;
}
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
function getSeats()
{
var economySeats;
$.get("http://35.160.243.26:8080/getSeatBookings?carrierCode="+getParameterByName("carrierCode"),function(allData)
{
var jsonData= JSON.parse(allData);
economySeats=jsonData.seatingPlan.economy;
loadValue(jsonData.seatConfiguration, economySeats);
bookedSeats(jsonData);
createMap();
//console.log(jsonData);
});
}
</script>
</head>
<body onload='getSeats();'>
<!-- <button type="button" onClick="loadValue();">loadValue</button> -->
<div class="row">
<div class="col m2 teal lighten-3" style="height:100vh;">
<img src="Logo-Cathay Match.png" style="width:150px; height:200px;">
<p >Please select your seating preferences</p>
<form id="book" action="#">
<p>
<input name="group1" type="radio" id="talk" onclick="talkPref()"/>
<label for="talk" class="black-text">I would like to socialize</label>
</p>
<p>
<input name="group1" type="radio" id="sleep" onclick="sleepPref()"/>
<label for="sleep" class="black-text">I would like to sleep</label>
</p>
<p>
<input name="group1" type="radio" id="none" onclick="nonePref()"/>
<label for="none" class="black-text">No Preferences</label>
</p>
<button type="submit" id="submit" onclick="Book(),location.reload();">Book</button>
</div>
</form>
<div class="col m10">
<p align="center" id="table"> <!-- where the table is inserted-->
</p>
</div>
</div>
</body>
<html>