--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -54,15 +54,19 @@
';
- $jqmVersion = "1.0rc1";
+ $jqmVersion = "1.0";
if (isDebugServer()) {
$jqmcss = $basePath . "css/jquery.mobile-$jqmVersion.css";
- $jqjs = $basePath . "js/jquery-1.6.2.min.js";
+ $jqjs = $basePath . "js/jquery-1.6.4.min.js";
$jqmjs = $basePath . "js/jquery.mobile-$jqmVersion.js";
+
+ $jqmcss = $basePath . "css/jquery.mobile-b90eab4935.css";
+ $jqmjs = $basePath . "js/jquery.mobile-b90eab4935.js";
} else {
$jqmcss = "//code.jquery.com/mobile/$jqmVersion/jquery.mobile-$jqmVersion.min.css";
- $jqjs = "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js";
+ $jqjs = "//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js";
$jqmjs = "//code.jquery.com/mobile/$jqmVersion/jquery.mobile-$jqmVersion.min.js";
+
}
echo '
@@ -241,5 +245,36 @@
}
}
+//stop list collapsing
+function stopCompare($stopName) {
+ return substr(trim(preg_replace("/\(Platform.*/", "", $stopName)),0,9);
+}
+function stopGroupTitle($stopName,$stopdesc) {
+ if (preg_match("/Dr |Cct |Cir |Av |St |Cr |Parade |Way |Bank /",$stopName)) {
+ $descParts = explode("
",$stopdesc);
+ return trim(str_replace("Street: ","",$descParts[0]));
+ } else {
+ return trim(preg_replace("/\(Platform.*/", "",$stopName));
+ }
+}
+
+function viaPointNames($tripid, $stop_sequence = "") {
+ $viaPointNames = Array();
+ foreach (viaPoints($tripid, $stop_sequence) as $point) {
+ if (strstr($point['stop_name'], "Station")
+ || strstr($point['stop_name'], "Shops")
+ || strstr($point['stop_name'], "CIT")
+ || strstr($point['stop_name'], "School")
+ || strstr($point['stop_name'], "University")
+ ) {
+ $viaPointNames[] = $point['stop_name'];
+ }
+ }
+ if (sizeof($viaPointNames) > 0) {
+ return r_implode(", ", $viaPointNames);
+ } else {
+ return "";
+ }
+}
?>