-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
261 lines (196 loc) · 9.29 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<style>
#dashboard {
background-image:url(dashboard/background.png);
background-size:auto;
/* background-size:320px 480px; */
background-repeat:no-repeat;
}
/*Centers Images in their columns on dashboard*/
#dashboard img {
display: block;
margin-left: auto;
margin-right: auto;
}
#dashboard .icontext {
padding-bottom:40px;
text-align:center;
font-size:11px;
font-weight:bold;
}
#logo img {
margin-top:-10px;
display:block;
}
#infobutton img {
padding-left:270px;
}
#info .projectinfoheaders {
text-align:center;
font-size:14px;
font-weight:bold;
}
#info .projectinfonames {
text-align:center;
font-size:12px;
}
</style>
<script type="text/javascript" src="phonegap.js"></script>
<script src="childbrowser.js" type="text/javascript"></script>
<!-- Start Jquery Mobile Includes -->
<link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.0.1.min.css" />
<link rel="stylesheet" href="jquery.mobile/nscc-mobile-styles.css" />
<script type="text/javascript" src="jquery.mobile/jquery-1.7.1.min.js"></script>
<!-- The below script turns on the automatic back buttons sitewide. To turn them off remove the script. It must be located before jquery.mobile is called -->
<script type="text/javascript">
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
if(isAndroid) {
// do not put back button in this case because of the awesomeness that is droid native navigation
}
else
{
// we must provide for the lesser needy mobile devices here
$(document).bind("mobileinit", function(){
$.mobile.page.prototype.options.addBackBtn= true;
});
}
</script>
<script type="text/javascript" src="jquery.mobile/jquery.mobile-1.0.1.min.js"></script>
<!-- End Jquery Mobile Includes-->
<!-- Begin checkConnection -->
<script type="text/javascript">
// Wait for PhoneGap to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// PhoneGap is loaded and it is now safe to make calls PhoneGap methods
//
function onDeviceReady() {
checkConnection();
}
$( function() {
$('.connection_test').bind( 'tap', function() {
checkConnection();
} );
} );
function checkConnection() {
var networkState = navigator.network.connection.type;
var states = {};
states[Connection.UNKNOWN] = 'Unknown connection';
states[Connection.ETHERNET] = 'Ethernet connection';
states[Connection.WIFI] = 'WiFi connection';
states[Connection.CELL_2G] = 'Cell 2G connection';
states[Connection.CELL_3G] = 'Cell 3G connection';
states[Connection.CELL_4G] = 'Cell 4G connection';
states[Connection.NONE] = 'No network connection';
//alert('Connection type: ' + states[networkState]); // uncomment to test
if (states[networkState] == 'No network connection') {
alert("You are offline. This feature is only available if you are online.");
}
// For the Ipad
// When offline it reports as "Unknown connection"
// Hopefully PhoneGap will fix with bug.
else if (states[networkState] == 'Unknown connection' && !isAndroid) {
navigator.notification.alert('You are offline. This feature is only available if you are online.', // Message text
alertDismissed, // Alert callback (what happens when button is pressed)
'Alert', // Alert Title
'OK' // Button Text
);
function alertDismissed() {
// This is where you put the code that will run when the user
// clicks the "OK" button on the checkConnection alert.
}
}
else {
// Do Nothing!
}
}
</script>
<!-- End checkConnection -->
</head>
<body>
<!-- Start of first page -->
<div data-role="page">
<div data-role="content" id="dashboard">
<fieldset class="ui-grid-b">
<div class="ui-block-a"> <a href="#" onClick="checkConnection(); window.plugins.childBrowser.showWebPage('http://apps.northeaststate.edu/mobile/directory.html', { showLocationBar: true });"><img src="dashboard/directory-57.png" width="57" height="57"/></a><div class="icontext">Directory</div>
</div>
<div class="ui-block-b"> <a href="#maps"><img src="dashboard/maps-57.png" width="57" height="57"/></a><div class="icontext">Maps</div>
</div>
<div class="ui-block-c"><a href="#" onClick="checkConnection(); window.plugins.childBrowser.showWebPage('http://apps.northeaststate.edu/mobile/news/site.php', { showLocationBar: true });"><img src="dashboard/news-57.png" width="57" height="57"/></a><div class="icontext">News</div>
</div>
<div class="ui-block-a"> <a href="pages/sites.html" rel="external" ><img src="dashboard/sites-57.png" width="57" height="57"/></a><div class="icontext">Campus Sites</div>
</div>
<div class="ui-block-b"> <a href="pages/library.html" rel="external" ><img src="dashboard/library-57.png" width="57" height="57"/></a><div class="icontext">Library</div>
</div>
<div class="ui-block-c"> <a href="#" onClick="checkConnection(); window.plugins.childBrowser.showWebPage('http://m.facebook.com/northeaststate?view=wall&refid=0', { showLocationBar: true });"><img src="dashboard/facebook-57.png" width="57" height="57"/></a><div class="icontext">Facebook</div>
</div>
<div class="ui-block-a"> <a href="pages/twitter.html" rel="external" onclick="checkConnection();"><img src="dashboard/twitter-57.png" width="57" height="57"/></a><div class="icontext">Twitter</div>
</div>
<div class="ui-block-b"> <a onClick="checkConnection(); window.plugins.childBrowser.showWebPage('http://www.youtube.com/user/NortheastStateVideo', { showLocationBar: true });"><img src="dashboard/youtube-57.png" width="57" height="57"/></a><div class="icontext">YouTube</div>
</div>
<div class="ui-block-b"> <a href="#" onClick="checkConnection(); window.plugins.childBrowser.showWebPage('https://banssprod.northeaststate.edu', { showLocationBar: true });"><img src="dashboard/Norstar-57.png" width="57" height="57"/></a><div class="icontext">NORSTAR</div>
</div>
</fieldset>
<div id="logo">
<img src="dashboard/logo.png" width="250"/>
</div><!-- /logo -->
<div id="infobutton"> <a href="#info"><img src="dashboard/12-eye.png" width="20"/></a>
</div><!-- /info -->
</div><!-- /content -->
</div><!-- / first page -->
<!-- Start of Campus Maps page -->
<div data-role="page" id="maps">
<div data-role="header" data-theme="b">
<h1>Campus Maps</h1>
</div><!-- /header -->
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li> <a href="#" onClick="checkConnection(); window.plugins.childBrowser.showWebPage('http://apps.northeaststate.edu/mobile/maincampusmap.html', { showLocationBar: false });">Main Campus </a> </li>
<li> <a href="#" onClick="checkConnection(); window.plugins.childBrowser.showWebPage('http://apps.northeaststate.edu/mobile/kingsportmap.html', { showLocationBar: false });">Kingsport </a> </li>
</ul>
</div><!-- /content -->
</div><!-- /Campus Maps page -->
<!-- Start of Info page -->
<div data-role="page" id="info">
<div data-role="header" data-theme="b">
<h1>Project Info</h1>
</div><!-- /header -->
<div data-role="content">
<div class="projectinfoheaders">
<p>Created By:</p>
<p>The App Committee</p>
</div> <!-- /projectinfoheaders class-->
<div class="projectinfonames"><p>
Allan Anderson<br>
Patsy Bowers<br>
Russell Bowman<br>
Bob Carpenter<br>
Chris Demas<br>
Tom Huskisson<br>
Margaret Lester<br>
Fred Lewis<br>
Jason Penwell<br>
Dan Perry<br>
</p></div><!-- /projectinfonames class-->
<div class="projectinfoheaders">
<p>Lead Developers:</p>
</div> <!-- /projectinfoheaders class-->
<div class="projectinfonames"><p>
Russell Bowman<br>
Chris Demas<br>
</p></div><!-- /projectinfonames class-->
<div class="projectinfoheaders">
<p>Dashboard Design:</p>
</div> <!-- /projectinfoheaders class-->
<div class="projectinfonames"><p>
Jason Penwell<br>
</p></div><!-- /projectinfonames class-->
</div><!-- /content -->
</div><!-- /Info page -->
</body>
</html>