-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.html
executable file
·111 lines (87 loc) · 3.68 KB
/
dashboard.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/navbar_css.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<button type="button" class="navbar-toggle collapsed" id="uber">
<span class="glyphicon glyphicon-bed"></span>
</button>
<a class="navbar-brand" href="#">My Plan</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">My plan</a></li>
<li><a href="food.html">I'm hungry!</a></li>
<li><a href="photos-list.html">Our Photos</a></li>
<li><a href="group.html">My Group</a></li>
</ul>
</div>
</div>
</nav>
<p></p>
<div class="container">
<div id="places-list">
</div>
<!--This is the layout of a single card -->
</div>
<script>
$('#uber').click(
function() {
window.location="https://play.google.com/store/apps/details?id=com.ubercab&hl=en";
}
);
var all_places;
console.log(localStorage.getItem('group_id'));
$.ajax({
url: 'backend/places_display.php',
type: 'post',
dataType: 'json',
data: JSON.parse('{"group_id":"'+ localStorage.getItem("group_id")+'"}'),
success: function(data) {
console.log(data);
all_places = data ;
for(var i in data){
console.log(data[i]);
$('#places-list').append(
'<div class="panel panel-default" onclick="place_picked('+ i +');">'+
'<img class="width-match-parent" src="' + data[i]['photo_url'] +
'"> <div class="container-fluid"> <h4 class="heading-inline">'+
data[i]['place_name'] +
'</h4> <input type="checkbox" class="right-aligned" name="checkbox-place"></input>'+
'</div> </div>'
// ''
// '<div class="panel panel-default"><img class="width-match-parent" src="' +
// json[i]['icon']+
// '"> <div class="container-fluid"><h4 class="heading-inline">'+
// json[i]['name']+
// '</h4> <input type="checkbox" class="right-aligned" name="checkbox-place"></div> </div> </div>'
);
}
}
});
place_picked = function(i){
console.log();
localStorage.setItem("place_id", all_places[i]['place_id']);
console.log('place id is:'+ all_places[i]['place_id']);
window.location="place_details.html";
}
</script>
</body>
</html>
<!--
TODO: Replace normal button by FAB