<!doctype html> |
<?php |
<html> |
include('common.inc.php'); |
<head> |
// remove all the variable in the session |
<meta charset="UTF-8" /> |
session_unset(); |
<title>jQTouch β</title> |
|
<style type="text/css" media="screen">@import "jqtouch/jqtouch.min.css";</style> |
//destroy the session |
<style type="text/css" media="screen">@import "themes/jqt/theme.min.css";</style> |
session_destroy(); |
<script src="jqtouch/jquery.1.3.2.min.js" type="text/javascript" charset="utf-8"></script> |
if (isset($_REQUEST['service_period'])) $_SESSION['service_period'] = $_REQUEST['service_period']; |
<script src="jqtouch/jqtouch.min.js" type="application/x-javascript" charset="utf-8"></script> |
if (isset($_REQUEST['time'])) $_SESSION['time'] = $_REQUEST['time']; |
<script src="extensions/jqt.location.js" type="application/x-javascript" charset="utf-8"></script> |
|
|
|
<script type="text/javascript" charset="utf-8"> |
include_header("bus.lambdacomplex.org",false, true) |
var jQT = new $.jQTouch({ |
?> |
icon: 'jqtouch.png', |
<div data-role="page" data-theme="b" id="jqm-home" class="ui-page ui-body-b ui-page-active"> |
addGlossToIcon: false, |
<div id="jqm-homeheader"> |
startupScreen: 'jqt_startup.png', |
<center><h1 id="jqm-logo"><img src="apple-touch-icon.png" alt="logo" width="64" height="64" /><br> |
statusBar: 'black', |
bus.lambdacomplex.org</h1></center> |
preloadImages: [ |
</div> |
'themes/jqt/img/back_button.png', |
<div data-role="content"> |
'themes/jqt/img/back_button_clicked.png', |
<a href="tripPlanner.php" data-role="button">Launch Trip Planner...</a> |
'themes/jqt/img/button_clicked.png', |
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> |
'themes/jqt/img/grayButton.png', |
<li data-role="list-divider">Timetables - Stops</li> |
'themes/jqt/img/whiteButton.png', |
<li><a href="stopList.php">Major (Timing Point) Stops</a></li> |
'themes/jqt/img/loading.gif' |
<li><a href="stopList.php">All Stops</a></li> |
] |
<li><a href="stopList.php?nearbyfavs=yes">Nearby/Favourite Stops</a></li> |
}); |
</ul> |
$(function(){ |
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> |
function setDisplay(text) { |
<li data-role="list-divider">Timetables - Routes</li> |
$('.info').empty().append(text) |
<li><a href="routeList.php">Routes By Final Destination</a></li> |
} |
<li><a href="routeList.php?bynumber=yes">Routes By Number</a></li> |
|
<li><a href="routeList.php?nearbyfavs=yes">Nearby/Favourites Routes</a></li> |
// We pass "updateLocation" a callback function, |
</ul> |
// to run once we have the coordinates. |
<div class="ui-body ui-body-c"> |
// We also set it to a variable, so we can know |
<h3>Time/Place Settings</h3> |
// right away if it's working or not |
<div data-role="fieldcontain"> |
var lookup = jQT.updateLocation(function(coords){ |
<label for="geolocate"> Current Location: </label> |
if (coords) { |
<input type="text" id="geolocate" name="geolocate"/> <a href="#" style="display:none" name="here" id="here"/>Here?</a> |
setDisplay('Latitude: ' + coords.latitude + '<br />Longitude: ' + coords.longitude); |
</div> |
$('.nearby').empty().append('<a href="list.php?lat=' + coords.latitude + '&lng=' + coords.longitude + '">Nearby List</a>'); |
<div data-role="fieldcontain"> |
} else { |
<label for="time"> Time: </label> |
setDisplay('Device not capable of geo-location.'); |
<input type="time" value="<?php echo date("H:m"); ?>"/> <a href="#" style="display:none" name="currentTime" id="currentTime"/>Current Time?</a> |
} |
</div> |
}); |
<div data-role="fieldcontain"> |
|
<label for="service_period"> Service Period: </label> |
if (lookup) { |
<select name="service_period"> |
setDisplay('Looking up location…'); |
<?php |
} |
foreach ($service_periods as $service_period) { |
}); |
echo "<option value=\"$service_period\"".(service_period() === $service_period ? "SELECTED" : "").'>'.ucwords($service_period).'</option>'; |
// Some sample Javascript functions: |
}?> |
$(function(){ |
</select> |
$('a[target="_blank"]').click(function() { |
<a href="#" style="display:none" name="currentPeriod" id="currentPeriod"/>Current Period?</a> |
if (confirm('This link opens in a new window.')) { |
</div> |
return true; |
|
} else { |
<input type="submit" value="Update"/> |
$(this).removeClass('active'); |
</div> |
return false; |
<script> |
} |
$('#here').click(function(event) { $('#geolocate').val(getCookie('geolocate')); return false;}); |
}); |
$('#here').show(); |
// Page animation callback events |
|
$('#pageevents'). |
|
bind('pageAnimationStart', function(e, info){ |
|
$(this).find('.info').append('Started animating ' + info.direction + '… '); |
|
}). |
|
bind('pageAnimationEnd', function(e, info){ |
|
$(this).find('.info').append(' finished animating ' + info.direction + '.<br /><br />'); |
|
}); |
|
// Page animations end with AJAX callback event, example 1 (load remote HTML only first time) |
|
$('#callback').bind('pageAnimationEnd', function(e, info){ |
|
if (!$(this).data('loaded')) { // Make sure the data hasn't already been loaded (we'll set 'loaded' to true a couple lines further down) |
|
$(this).append($('<div>Loading</div>'). // Append a placeholder in case the remote HTML takes its sweet time making it back |
|
load('ajax.html .info', function() { // Overwrite the "Loading" placeholder text with the remote HTML |
|
$(this).parent().data('loaded', true); // Set the 'loaded' var to true so we know not to re-load the HTML next time the #callback div animation ends |
|
})); |
|
} |
|
}); |
|
// Orientation callback event |
|
$('body').bind('turn', function(e, data){ |
|
$('#orient').html('Orientation: ' + data.orientation); |
|
}); |
|
}); |
|
</script> |
</script> |
</head> |
|
<body> |
|
<div id="home" class="current"> |
|
<div class="toolbar"> |
|
<h1>jQTouch</h1> |
|
<a class="button slideup" id="infoButton" href="#about">About</a> |
|
</div> |
|
<ul class="rounded"> |
|
<li class="arrow"><a href="#ui">User Interface</a> <small class="counter">4</small></li> |
|
<li class="arrow"><a href="list.php">All stops List</a></li> |
|
<li class="arrow nearby">Nearby List</li> |
|
<li class="arrow"><a href="list.php">Favourites List</a></li> |
|
</ul> |
|
<div class="info"> |
|
<p>Add this page to your home screen to view the custom icon, startup screen, and full screen mode.</p> |
|
</div> |
|
</div> |
</div> |
</body> |
</div> |
|
</body> |
</html> |
</html> |
|
|