-
Notifications
You must be signed in to change notification settings - Fork 0
/
allClubs.html
144 lines (140 loc) · 6.99 KB
/
allClubs.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
<!DOCTYPE HTML>
<html>
<head>
<title>CampusGrids: All Clubs</title>
<meta charset="utf-8" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/themes/campus.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile.structure-1.3.0.min.css" />
<link rel="stylesheet" href="css/font-awesome.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
<script type="text/javascript" src="js/CG.js"></script>
</head>
<body>
<div data-role="page" id="allClubsPage" data-theme="a">
<!-- Header -->
<div data-role="panel" id="menuPanel" data-position="right" data-display="overlay" data-theme="b">
<ul data-role="listview">
<li>
<a href="allClubs.html" data-ajax="false">All Clubs</a>
</li>
<li>
<a href="allEvents.html" data-ajax="false">All Events</a>
</li>
<li>
<a href="findFriends.html" data-ajax="false">Find Friends</a>
</li>
<!--<li>
<a href="promote.html">Promote</a>
</li>-->
<li>
<a href="settings.html" data-ajax="false">Settings</a>
</li>
<li>
<a href="feedback.html" data-ajax="false">Feedback</a>
</li>
<li>
<a href="linkAccounts.html" data-ajax="false">Link Accounts</a>
</li>
</ul>
<!-- <a style="margin-top: 50px;" href="#" data-rel="close" data-role="button" data-icon="delete" data-iconpos="left">Close Menu</a> -->
</div>
<div data-role="header" data-position="fixed" data-tap-toggle="false" data-theme="b">
<img src="img/logo_small.png" class="smallLogo">
<h1 class="headerTitle">All Clubs</h1>
<a id="header" href="#menuPanel" class="ui-btn-right"><i style="font-size: 1.4em;" class="icon-reorder"></i></a>
<!-- Sub-Header for this page -->
<div class="ui-grid-a" style="border-top:1px solid grey;">
<div class="ui-block-a" style="width: 75%;">
<div class="ui-btn-inner"><p id="network" style="font-size:x-large;"></p></div>
</div>
<div class="ui-block-b" style="width: 25%; text-align: right;">
<a href="#popupChangeNetwork" data-role="button" data-rel="popup" data-position-to="window" data-inline="true" data-transition="pop">Change</a>
</div>
</div>
</div>
<!-- /header -->
<!------------------------------- CONTENT ---------------------------------------------------------->
<div data-role="content" id="content" data-theme="a">
<ul id="clubList" data-role="listview" class="ui-icon-alt">
</ul>
<div data-role="popup" id="popupChangeNetwork" data-overlay-theme="a" data-theme="a" style="width:100%;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Networks</h1>
</div>
<a href="allClubs.html?network=algonquin" data-role="button" data-ajax="false">Algonquin College</a>
<a href="allClubs.html?network=carletonu" data-role="button" data-ajax="false">Carleton University</a>
<a href="allClubs.html?network=ottawau" data-role="button" data-ajax="false">University of Ottawa</a>
</div>
</div>
<!------------------------------- END OF CONTENT ---------------------------------------------------------->
<div data-role="footer" data-position="fixed" id="footer" data-tap-toggle="false">
<div data-role="navbar">
<ul>
<li data-theme="a">
<a href="home.html" data-ajax="false"><i class="icon-home icon-2x"></i></a>
</li>
<li data-theme="a">
<a href="search.html" data-ajax="false"><i class="icon-search icon-2x"></i></a>
</li>
<li data-theme="a">
<a href="calendar.html" data-ajax="false"><i class="icon-calendar icon-2x"></i></a>
</li>
<li data-theme="a">
<a href="profile.html" data-ajax="false"><i class="icon-user icon-2x"></i></a>
</li>
</ul>
</div>
</div>
<!-- /footer -->
</div>
<script>
$("body").css("overflow", "hidden");
$('#search-1').focus(function () {
$('#footer').hide();
});
$('#search-1').blur(function () {
$('#footer').show();
});
/* Get network of the grid we are looking at */
if (getKeyValue('network')) {
var thisNetwork = getKeyValue('network');
switch (thisNetwork) {
case 'algonquin':
var thisNetwork = 'Algonquin College';
break;
case 'carletonu':
var thisNetwork = 'Carleton University';
break;
case 'ottawau':
var thisNetwork = 'University of Ottawa';
break;
}
} else {
var thisNetwork = localStorage.network;
};
document.getElementById("network").innerHTML = thisNetwork;
$(document).ready(function () {
$.post("allClubsList.php", { "network": thisNetwork },
function (data) {
if (data[0] == 0) {
$('#clubList').html('<p>Sorry, there are no clubs in this network.</p>');
}
else {
$('#clubList').html('');
for (x in data) {
// http://campusgrids.com/1mobileApp/img/defaultprofile.png
var profilePicUrl = data[x].profile_picture; // Get profile picture URL
profilePicUrl = profilePicUrl.substring(1); // remove the .
var memberCount = data[x].memberCount;
$('#clubList').append("<li><a href='profile.html?gridid=" + data[x].gridid + "' data-ajax='false'><img src='http://campusgrids.com/1mobileApp" + profilePicUrl + "' alt='profile picture'><h2>" + data[x].first_name + "</h2><p>" + memberCount + " Joined</p></a></li>");
}
$("#clubList").listview("refresh");
}
}, "json");
});
</script>
</body>
</html>