shared_writable_dirs: | |
- /labs/tiles | |
- /lib/staticmaplite/cache | |
php_extensions: [pgsql, pdo, pdo_pgsql, curl] | |
/labs/tiles/12 | |
/labs/tiles/13 | |
/labs/tiles/14 | |
/labs/tiles/15 | |
/labs/tiles/16 | |
/labs/tiles/17 | |
/labs/tiles/19 |
<?php | <?php |
include ('include/common.inc.php'); | include ('include/common.inc.php'); |
include_header("About", "about") | include_header("About", "about") |
?> | ?> |
<p> | <p> |
Busness Time - An ACT bus timetable webapp<br /> | Busness Time - An ACT bus timetable webapp<br /> |
Based on the maxious-canberra-transit-feed (<a | Based on the maxious-canberra-transit-feed (<a |
href="http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip">download</a>, | href="http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip">download</a>, |
last updated <?php | last updated <?php |
echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br /> | echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br /> |
Source code for the <a | Source code for the <a |
href="https://github.com/maxious/ACTBus-data">transit | href="https://github.com/maxious/ACTBus-data">transit |
feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this | feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this |
site</a> available from github.<br /> | site</a> available from github.<br /> |
Uses jQuery Mobile, PHP, PostgreSQL, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br /> | Uses jQuery Mobile, PHP, PostgreSQL, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br /> |
<br /> | <br /> |
Feedback encouraged; contact maxious@lambdacomplex.org<br /> | Feedback encouraged; contact maxious@lambdacomplex.org<br /> |
<br /> | <br /> |
Some icons by Joseph Wain / glyphish.com<br /> | Some icons by Joseph Wain / glyphish.com<br /> |
Native clients also available for iPhone(<a href="http://itunes.apple.com/au/app/cbrtimetable/id444287349?mt=8">cbrTimetable by Sandor Kolotenko</a> | |
, <a href="http://itunes.apple.com/au/app/act-buses/id376634797?mt=8">ACT Buses by David Sullivan</a>) | |
and Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</a>) | |
<br /> | |
<br /> | <br /> |
<small>Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip. | <small>Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip. |
Whilst every effort has been made to ensure the high quality and accuracy of the Site, the Author makes no warranty, | Whilst every effort has been made to ensure the high quality and accuracy of the Site, the Author makes no warranty, |
express or implied concerning the topicality, correctness, completeness or quality of the information, which is provided | express or implied concerning the topicality, correctness, completeness or quality of the information, which is provided |
"as is". The Author expressly disclaims all warranties, including but not limited to warranties of fitness for a particular purpose and warranties of merchantability. | "as is". The Author expressly disclaims all warranties, including but not limited to warranties of fitness for a particular purpose and warranties of merchantability. |
All offers are not binding and without obligation. The Author expressly reserves the right, in his discretion, to suspend, | All offers are not binding and without obligation. The Author expressly reserves the right, in his discretion, to suspend, |
change, modify, add or remove portions of the Site and to restrict or terminate the use and accessibility of the Site | change, modify, add or remove portions of the Site and to restrict or terminate the use and accessibility of the Site |
without prior notice. </small> | without prior notice. </small> |
<?php | <?php |
include_footer(); | include_footer(); |
?> | ?> |
#!/bin/bash | #!/bin/bash |
#this script should be run from a fresh git checkout from github | #this script should be run from a fresh git checkout from github |
#ami base must have yum install lighttpd-fastcgi, git, tomcat6 | #ami base must have yum install lighttpd-fastcgi, git, tomcat6 |
#php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2 | #php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2 |
#postgres postgres-server php-pg | #postgres postgres-server php-pg |
#http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12 | #http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12 |
cp /root/aws.php /tmp/ | sh busuiphp.sh |
mkdir /var/www/lib/staticmaplite/cache | sh busuidb.sh |
chcon -h system_u:object_r:httpd_sys_content_t /var/www | sh busuiotp.sh |
chcon -R -h root:object_r:httpd_sys_content_t /var/www/* | |
chcon -R -t httpd_sys_content_rw_t /var/www/lib/staticmaplite/cache | |
chmod -R 777 /var/www/lib/staticmaplite/cache | |
chcon -R -t httpd_sys_content_rw_t /var/www/labs/tiles | |
chmod -R 777 /var/www/labs/tiles | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \ | |
-O /var/www/cbrfeed.zip | |
createdb transitdata | |
createlang -d transitdata plpgsql | |
psql -d transitdata -f /var/www/lib/postgis.sql | |
# curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz | |
#made with pg_dump transitdata | gzip -c > transitdata.cbrfeed.sql.gz | |
gunzip /var/www/transitdata.cbrfeed.sql.gz | |
psql -d transitdata -f /var/www/transitdata.cbrfeed.sql | |
#createuser transitdata -SDRP | |
#password transitdata | |
#psql -d transitdata -c \"GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;\" | |
php /var/www/updatedb.php | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \ | |
-O /tmp/Graph.obj | |
rm -rfv /usr/share/tomcat6/webapps/opentripplanner* | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-webapp.war \ | |
-O /usr/share/tomcat6/webapps/opentripplanner-webapp.war | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-api-webapp.war \ | |
-O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war | |
/etc/init.d/tomcat6 restart | |
createdb transitdata | |
createlang -d transitdata plpgsql | |
psql -d transitdata -f /var/www/lib/postgis.sql | |
# curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz | |
#made with pg_dump transitdata | gzip -c > transitdata.cbrfeed.sql.gz | |
gunzip /var/www/transitdata.cbrfeed.sql.gz | |
psql -d transitdata -f /var/www/transitdata.cbrfeed.sql | |
#createuser transitdata -SDRP | |
#password transitdata | |
#psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;" | |
#psql -d transitdata -c "GRANT SELECT,INSERT ON TABLE myway_observations,myway_routes,myway_stops,myway_timingdeltas TO transitdata;" | |
#psql -d transitdata -c "GRANT SELECT,INSERT,UPDATE ON TABLE myway_routes,myway_stops TO transitdata;" | |
##psql -d transitdata -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO transitdata;" | |
php /var/www/updatedb.php |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \ | |
-O /tmp/Graph.obj | |
/etc/init.d/tomcat6 stop | |
rm -rfv /usr/share/tomcat6/webapps/opentripplanner* | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-webapp.war \ | |
-O /usr/share/tomcat6/webapps/opentripplanner-webapp.war | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-api-webapp.war \ | |
-O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war | |
/etc/init.d/tomcat6 restart | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/Graph.obj \ | |
-O /tmp/Graph.obj | |
/etc/init.d/tomcat6 stop | |
rm -rfv /usr/share/tomcat6/webapps/opentripplanner* | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/opentripplanner-webapp.war \ | |
-O /usr/share/tomcat6/webapps/opentripplanner-webapp.war | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/opentripplanner-api-webapp.war \ | |
-O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war | |
/etc/init.d/tomcat6 restart | |
cp /root/aws.php /tmp/ | |
mkdir /var/www/lib/staticmaplite/cache | |
chcon -h system_u:object_r:httpd_sys_content_t /var/www | |
chcon -R -h root:object_r:httpd_sys_content_t /var/www/* | |
chcon -R -t httpd_sys_content_rw_t /var/www/lib/staticmaplite/cache | |
chmod -R 777 /var/www/lib/staticmaplite/cache | |
chcon -R -t httpd_sys_content_rw_t /var/www/labs/tiles | |
chmod -R 777 /var/www/labs/tiles | |
chcon -R -t httpd_sys_content_rw_t /var/www/lib/openid-php/oid_store | |
chmod -R 777 /var/www/lib/openid-php/oid_store | |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \ | |
-O /var/www/cbrfeed.zip |
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> | |
<!-- Single graph --> | |
<import resource="classpath:org/opentripplanner/api/application-context.xml" /> | |
<bean id="graphBundle" class="org.opentripplanner.model.GraphBundle"> | |
<property name="path" value="/tmp/" /> | |
</bean> | |
</beans> | |
/*! | |
* jQuery Mobile v1.0b1 | |
* http://jquerymobile.com/ | |
* | |
* Copyright 2010, jQuery Project | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
*/ | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. | |
* Note: Code is in draft form and is subject to change | |
*/ | |
/* A | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-a { | |
border: 1px solid #2A2A2A; | |
background: #111111; | |
color: #ffffff; | |
font-weight: bold; | |
text-shadow: 0 -1px 1px #000000; | |
background-image: -moz-linear-gradient(top, | |
#3c3c3c, | |
#111111); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #3c3c3c), | |
color-stop(1, #111111)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#3c3c3c', EndColorStr='#111111')"; | |
} | |
.ui-bar-a, | |
.ui-bar-a input, | |
.ui-bar-a select, | |
.ui-bar-a textarea, | |
.ui-bar-a button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-a .ui-link-inherit { | |
color: #fff; | |
} | |
.ui-bar-a .ui-link { | |
color: #7cc4e7; | |
font-weight: bold; | |
} | |
.ui-body-a { | |
border: 1px solid #2A2A2A; | |
background: #222222; | |
color: #fff; | |
text-shadow: 0 1px 0 #000; | |
font-weight: normal; | |
background-image: -moz-linear-gradient(top, | |
#666666, | |
#222222); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #666666), | |
color-stop(1, #222222)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666', EndColorStr='#222222)')"; | |
} | |
.ui-body-a, | |
.ui-body-a input, | |
.ui-body-a select, | |
.ui-body-a textarea, | |
.ui-body-a button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-a .ui-link-inherit { | |
color: #fff; | |
} | |
.ui-body-a .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-br { | |
border-bottom: rgb(130,130,130); | |
border-bottom: rgba(130,130,130,.3); | |
border-bottom-width: 1px; | |
border-bottom-style: solid; | |
} | |
.ui-btn-up-a { | |
border: 1px solid #222; | |
background: #333333; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #000; | |
background-image: -moz-linear-gradient(top, | |
#555555, | |
#333333); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #555555), | |
color-stop(1, #333333)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#555555', EndColorStr='#333333')"; | |
} | |
.ui-btn-up-a a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-hover-a { | |
border: 1px solid #000; | |
background: #444444; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #000; | |
background-image: -moz-linear-gradient(top, | |
#666666, | |
#444444); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #666666), | |
color-stop(1, #444444)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666', EndColorStr='#444444')"; | |
} | |
.ui-btn-hover-a a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-down-a { | |
border: 1px solid #000; | |
background: #3d3d3d; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #000; | |
background-image: -moz-linear-gradient(top, | |
#333333, | |
#5a5a5a); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #333333), | |
color-stop(1, #5a5a5a)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#333333', EndColorStr='#5a5a5a')"; | |
} | |
.ui-btn-down-a a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-up-a, | |
.ui-btn-hover-a, | |
.ui-btn-down-a { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* B | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-b { | |
border: 1px solid #456f9a; | |
background: #5e87b0; | |
color: #fff; | |
font-weight: bold; | |
text-shadow: 0 -1px 1px #254f7a; | |
background-image: -moz-linear-gradient(top, | |
#81a8ce, | |
#5e87b0); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #81a8ce), | |
color-stop(1, #5e87b0)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#81a8ce', EndColorStr='#5e87b0')"; | |
} | |
.ui-bar-b, | |
.ui-bar-b input, | |
.ui-bar-b select, | |
.ui-bar-b textarea, | |
.ui-bar-b button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-b .ui-link-inherit { | |
color: #fff; | |
} | |
.ui-bar-b .ui-link { | |
color: #7cc4e7; | |
font-weight: bold; | |
} | |
.ui-body-b { | |
border: 1px solid #C6C6C6; | |
background: #cccccc; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
font-weight: normal; | |
background-image: -moz-linear-gradient(top, | |
#e6e6e6, | |
#cccccc); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #e6e6e6), | |
color-stop(1, #cccccc)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#e6e6e6', EndColorStr='#cccccc')"; | |
} | |
.ui-body-b, | |
.ui-body-b input, | |
.ui-body-b select, | |
.ui-body-b textarea, | |
.ui-body-b button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-b .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-b .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-b { | |
border: 1px solid #145072; | |
background: #2567ab; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #145072; | |
background-image: -moz-linear-gradient(top, | |
#4e89c5, | |
#2567ab); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #5f9cc5), | |
color-stop(1, #396b9e)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#4e89c5', EndColorStr='#2567ab')"; | |
} | |
.ui-btn-up-b a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-hover-b { | |
border: 1px solid #00516e; | |
background: #4b88b6; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #014D68; | |
background-image: -moz-linear-gradient(top, | |
#72b0d4, | |
#4b88b6); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #72b0d4), | |
color-stop(1, #4b88b6)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#72b0d4', EndColorStr='#4b88b6')"; | |
} | |
.ui-btn-hover-b a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-down-b { | |
border: 1px solid #225377; | |
background: #4e89c5; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #225377; | |
background-image: -moz-linear-gradient(top, | |
#396b9e, | |
#4e89c5); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #396b9e), | |
color-stop(1, #4e89c5)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#396b9e', EndColorStr='#4e89c5')"; | |
} | |
.ui-btn-down-b a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-up-b, | |
.ui-btn-hover-b, | |
.ui-btn-down-b { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* C | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-c { | |
border: 1px solid #B3B3B3; | |
background: #e9eaeb; | |
color: #3E3E3E; | |
font-weight: bold; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -moz-linear-gradient(top, | |
#f0f0f0, | |
#e9eaeb); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #f0f0f0), | |
color-stop(1, #e9eaeb)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#f0f0f0', EndColorStr='#e9eaeb')"; | |
} | |
.ui-bar-c, | |
.ui-bar-c input, | |
.ui-bar-c select, | |
.ui-bar-c textarea, | |
.ui-bar-c button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-c { | |
border: 1px solid #B3B3B3; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
background: #f0f0f0; | |
background-image: -moz-linear-gradient(top, | |
#eeeeee, | |
#dddddd); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #eeeeee), | |
color-stop(1, #dddddd)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee', EndColorStr='#dddddd')"; | |
} | |
.ui-body-c, | |
.ui-body-c input, | |
.ui-body-c select, | |
.ui-body-c textarea, | |
.ui-body-c button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-c .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-c .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-c { | |
border: 1px solid #ccc; | |
background: #eee; | |
font-weight: bold; | |
color: #444; | |
text-shadow: 0 1px 1px #f6f6f6; | |
background-image: -moz-linear-gradient(top, | |
#fefefe, | |
#eeeeee); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fdfdfd), | |
color-stop(1, #eeeeee)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#eeeeee')"; | |
} | |
.ui-btn-up-c a.ui-link-inherit { | |
color: #2F3E46; | |
} | |
.ui-btn-hover-c { | |
border: 1px solid #bbb; | |
background: #dadada; | |
font-weight: bold; | |
color: #101010; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -moz-linear-gradient(top, | |
#ededed, | |
#dadada); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #ededed), | |
color-stop(1, #dadada)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ededed', EndColorStr='#dadada')"; | |
} | |
.ui-btn-hover-c a.ui-link-inherit { | |
color: #2F3E46; | |
} | |
.ui-btn-down-c { | |
border: 1px solid #808080; | |
background: #fdfdfd; | |
font-weight: bold; | |
color: #111111; | |
text-shadow: 0 1px 1px #ffffff; | |
background-image: -moz-linear-gradient(top, | |
#eeeeee, | |
#fdfdfd); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #eeeeee), | |
color-stop(1, #fdfdfd)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee', EndColorStr='#fdfdfd')"; | |
} | |
.ui-btn-down-c a.ui-link-inherit { | |
color: #2F3E46; | |
} | |
.ui-btn-up-c, | |
.ui-btn-hover-c, | |
.ui-btn-down-c { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* D | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-d { | |
border: 1px solid #ccc; | |
background: #bbb; | |
color: #333; | |
text-shadow: 0 1px 0 #eee; | |
background-image: -moz-linear-gradient(top, | |
#ddd, | |
#bbb); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #ddd), | |
color-stop(1, #bbb)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#dddddd', EndColorStr='#bbbbbb')"; | |
} | |
.ui-bar-d, | |
.ui-bar-d input, | |
.ui-bar-d select, | |
.ui-bar-d textarea, | |
.ui-bar-d button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-d .ui-link-inherit { | |
color: #333; | |
} | |
.ui-bar-d .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-body-d { | |
border: 1px solid #ccc; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
background: #ffffff; | |
} | |
.ui-body-d, | |
.ui-body-d input, | |
.ui-body-d select, | |
.ui-body-d textarea, | |
.ui-body-d button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-d .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-d .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-d { | |
border: 1px solid #ccc; | |
background: #fff; | |
font-weight: bold; | |
color: #444; | |
text-shadow: 0 1px 1px #fff; | |
} | |
.ui-btn-up-d a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-hover-d { | |
border: 1px solid #aaa; | |
background: #eeeeee; | |
font-weight: bold; | |
color: #222; | |
cursor: pointer; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -moz-linear-gradient(top, | |
#fdfdfd, | |
#eeeeee); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fdfdfd), | |
color-stop(1, #eeeeee)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#eeeeee')"; | |
} | |
.ui-btn-hover-d a.ui-link-inherit { | |
color: #222; | |
} | |
.ui-btn-down-d { | |
border: 1px solid #aaaaaa; | |
background: #ffffff; | |
font-weight: bold; | |
color: #111; | |
text-shadow: 0 1px 1px #ffffff; | |
background-image: -moz-linear-gradient(top, | |
#eeeeee, | |
#ffffff); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #eeeeee), | |
color-stop(1, #ffffff)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee', EndColorStr='#ffffff')"; | |
} | |
.ui-btn-down-d a.ui-link-inherit { | |
color: #111; | |
} | |
.ui-btn-up-d, | |
.ui-btn-hover-d, | |
.ui-btn-down-d { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* E | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-e { | |
border: 1px solid #F7C942; | |
background: #fadb4e; | |
color: #333; | |
text-shadow: 0 1px 0 #fff; | |
background-image: -moz-linear-gradient(top, | |
#fceda7, | |
#fadb4e); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fceda7), | |
color-stop(1, #fadb4e)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fceda7', EndColorStr='#fadb4e')"; | |
} | |
.ui-bar-e, | |
.ui-bar-e input, | |
.ui-bar-e select, | |
.ui-bar-e textarea, | |
.ui-bar-d button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-e .ui-link-inherit { | |
color: #333; | |
} | |
.ui-bar-e .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-body-e { | |
border: 1px solid #F7C942; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
background: #faeb9e; | |
background-image: -moz-linear-gradient(top, | |
#fff, | |
#faeb9e); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fff), | |
color-stop(1, #faeb9e)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#faeb9e')"; | |
} | |
.ui-body-e, | |
.ui-body-e input, | |
.ui-body-e select, | |
.ui-body-e textarea, | |
.ui-body-e button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-e .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-e .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-e { | |
border: 1px solid #F7C942; | |
background: #fadb4e; | |
font-weight: bold; | |
color: #333; | |
text-shadow: 0 1px 0 #fff; | |
background-image: -moz-linear-gradient(top, | |
#fceda7, | |
#fadb4e); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fceda7), | |
color-stop(1, #fadb4e)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fceda7', EndColorStr='#fadb4e')"; | |
} | |
.ui-btn-up-e a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-hover-e { | |
border: 1px solid #e79952; | |
background: #fbe26f; | |
font-weight: bold; | |
color: #111; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -moz-linear-gradient(top, | |
#fcf0b5, | |
#fbe26f); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fcf0b5), | |
color-stop(1, #fbe26f)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcf0b5', EndColorStr='#fbe26f')"; | |
} | |
.ui-btn-hover-e a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-down-e { | |
border: 1px solid #F7C942; | |
background: #fceda7; | |
font-weight: bold; | |
color: #111; | |
text-shadow: 0 1px 1px #ffffff; | |
background-image: -moz-linear-gradient(top, | |
#fadb4e, | |
#fceda7); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #fadb4e), | |
color-stop(1, #fceda7)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fadb4e', EndColorStr='#fceda7')"; | |
} | |
.ui-btn-down-e a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-up-e, | |
.ui-btn-hover-e, | |
.ui-btn-down-e { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* links within "buttons" | |
-----------------------------------------------------------------------------------------------------------*/ | |
a.ui-link-inherit { | |
text-decoration: none !important; | |
} | |
/* Active class used as the "on" state across all themes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-active { | |
border: 1px solid #155678; | |
background: #4596ce; | |
font-weight: bold; | |
color: #fff; | |
cursor: pointer; | |
text-shadow: 0 -1px 1px #145072; | |
text-decoration: none; | |
background-image: -moz-linear-gradient(top, | |
#85bae4, | |
#5393c5); | |
background-image: -webkit-gradient(linear,left top,left bottom, | |
color-stop(0, #85bae4), | |
color-stop(1, #5393c5)); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#85bae4', EndColorStr='#5393c5')"; | |
outline: none; | |
} | |
.ui-btn-active a.ui-link-inherit { | |
color: #fff; | |
} | |
/* button inner top highlight | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-inner { | |
border-top: 1px solid #fff; | |
border-color: rgba(255,255,255,.3); | |
} | |
/* corner rounding classes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-corner-tl { | |
-moz-border-radius-topleft: .6em; | |
-webkit-border-top-left-radius: .6em; | |
border-top-left-radius: .6em; | |
} | |
.ui-corner-tr { | |
-moz-border-radius-topright: .6em; | |
-webkit-border-top-right-radius: .6em; | |
border-top-right-radius: .6em; | |
} | |
.ui-corner-bl { | |
-moz-border-radius-bottomleft: .6em; | |
-webkit-border-bottom-left-radius: .6em; | |
border-bottom-left-radius: .6em; | |
} | |
.ui-corner-br { | |
-moz-border-radius-bottomright: .6em; | |
-webkit-border-bottom-right-radius: .6em; | |
border-bottom-right-radius: .6em; | |
} | |
.ui-corner-top { | |
-moz-border-radius-topleft: .6em; | |
-webkit-border-top-left-radius: .6em; | |
border-top-left-radius: .6em; | |
-moz-border-radius-topright: .6em; | |
-webkit-border-top-right-radius: .6em; | |
border-top-right-radius: .6em; | |
} | |
.ui-corner-bottom { | |
-moz-border-radius-bottomleft: .6em; | |
-webkit-border-bottom-left-radius: .6em; | |
border-bottom-left-radius: .6em; | |
-moz-border-radius-bottomright: .6em; | |
-webkit-border-bottom-right-radius: .6em; | |
border-bottom-right-radius: .6em; | |
} | |
.ui-corner-right { | |
-moz-border-radius-topright: .6em; | |
-webkit-border-top-right-radius: .6em; | |
border-top-right-radius: .6em; | |
-moz-border-radius-bottomright: .6em; | |
-webkit-border-bottom-right-radius: .6em; | |
border-bottom-right-radius: .6em; | |
} | |
.ui-corner-left { | |
-moz-border-radius-topleft: .6em; | |
-webkit-border-top-left-radius: .6em; | |
border-top-left-radius: .6em; | |
-moz-border-radius-bottomleft: .6em; | |
-webkit-border-bottom-left-radius: .6em; | |
border-bottom-left-radius: .6em; | |
} | |
.ui-corner-all { | |
-moz-border-radius: .6em; | |
-webkit-border-radius: .6em; | |
border-radius: .6em; | |
} | |
/* Interaction cues | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-disabled { | |
opacity: .3; | |
} | |
.ui-disabled, | |
.ui-disabled a { | |
cursor: default; | |
} | |
/* Icons | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon { | |
background: #666; | |
background: rgba(0,0,0,.4); | |
background-image: url(images/icons-18-white.png); | |
background-repeat: no-repeat; | |
-moz-border-radius: 9px; | |
-webkit-border-radius: 9px; | |
border-radius: 9px; | |
} | |
/* Alt icon color | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon-alt { | |
background: #fff; | |
background: rgba(255,255,255,.3); | |
background-image: url(images/icons-18-black.png); | |
background-repeat: no-repeat; | |
} | |
/* HD/"retina" sprite | |
-----------------------------------------------------------------------------------------------------------*/ | |
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), | |
only screen and (min--moz-device-pixel-ratio: 1.5), | |
only screen and (min-resolution: 240dpi) { | |
.ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r, | |
.ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check, | |
.ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back, | |
.ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-search, | |
.ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on { | |
background-image: url(images/icons-36-white.png); | |
-moz-background-size: 776px 18px; | |
-o-background-size: 776px 18px; | |
-webkit-background-size: 776px 18px; | |
background-size: 776px 18px; | |
} | |
.ui-icon-alt { | |
background-image: url(images/icons-36-black.png); | |
} | |
} | |
/* plus minus */ | |
.ui-icon-plus { | |
background-position: -0 50%; | |
} | |
.ui-icon-minus { | |
background-position: -36px 50%; | |
} | |
/* delete/close */ | |
.ui-icon-delete { | |
background-position: -72px 50%; | |
} | |
/* arrows */ | |
.ui-icon-arrow-r { | |
background-position: -108px 50%; | |
} | |
.ui-icon-arrow-l { | |
background-position: -144px 50%; | |
} | |
.ui-icon-arrow-u { | |
background-position: -180px 50%; | |
} | |
.ui-icon-arrow-d { | |
background-position: -216px 50%; | |
} | |
/* misc */ | |
.ui-icon-check { | |
background-position: -252px 50%; | |
} | |
.ui-icon-gear { | |
background-position: -288px 50%; | |
} | |
.ui-icon-refresh { | |
background-position: -324px 50%; | |
} | |
.ui-icon-forward { | |
background-position: -360px 50%; | |
} | |
.ui-icon-back { | |
background-position: -396px 50%; | |
} | |
.ui-icon-grid { | |
background-position: -432px 50%; | |
} | |
.ui-icon-star { | |
background-position: -468px 50%; | |
} | |
.ui-icon-alert { | |
background-position: -504px 50%; | |
} | |
.ui-icon-info { | |
background-position: -540px 50%; | |
} | |
.ui-icon-home { | |
background-position: -576px 50%; | |
} | |
.ui-icon-search { | |
background-position: -612px 50%; | |
} | |
.ui-icon-checkbox-off { | |
background-position: -684px 50%; | |
} | |
.ui-icon-checkbox-on { | |
background-position: -648px 50%; | |
} | |
.ui-icon-radio-off { | |
background-position: -756px 50%; | |
} | |
.ui-icon-radio-on { | |
background-position: -720px 50%; | |
} | |
/* checks,radios */ | |
.ui-icon-checkbox-off, | |
.ui-icon-checkbox-on, | |
.ui-icon-radio-off, | |
.ui-icon-radio-on { | |
background-color: transparent; | |
-moz-border-radius: 0; | |
-webkit-border-radius: 0; | |
border-radius: 0; | |
} | |
.ui-icon-searchfield { | |
background-image: url(images/icon-search-black.png); | |
background-size: 16px 16px; | |
} | |
/* loading icon */ | |
.ui-icon-loading { | |
background-image: url(images/ajax-loader.png); | |
width: 40px; | |
height: 40px; | |
-moz-border-radius: 20px; | |
-webkit-border-radius: 20px; | |
border-radius: 20px; | |
background-size: 35px 35px; | |
} | |
/* Button corner classes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-corner-tl { | |
-moz-border-radius-topleft: 1em; | |
-webkit-border-top-left-radius: 1em; | |
border-top-left-radius: 1em; | |
} | |
.ui-btn-corner-tr { | |
-moz-border-radius-topright: 1em; | |
-webkit-border-top-right-radius: 1em; | |
border-top-right-radius: 1em; | |
} | |
.ui-btn-corner-bl { | |
-moz-border-radius-bottomleft: 1em; | |
-webkit-border-bottom-left-radius: 1em; | |
border-bottom-left-radius: 1em; | |
} | |
.ui-btn-corner-br { | |
-moz-border-radius-bottomright: 1em; | |
-webkit-border-bottom-right-radius: 1em; | |
border-bottom-right-radius: 1em; | |
} | |
.ui-btn-corner-top { | |
-moz-border-radius-topleft: 1em; | |
-webkit-border-top-left-radius: 1em; | |
border-top-left-radius: 1em; | |
-moz-border-radius-topright: 1em; | |
-webkit-border-top-right-radius: 1em; | |
border-top-right-radius: 1em; | |
} | |
.ui-btn-corner-bottom { | |
-moz-border-radius-bottomleft: 1em; | |
-webkit-border-bottom-left-radius: 1em; | |
border-bottom-left-radius: 1em; | |
-moz-border-radius-bottomright: 1em; | |
-webkit-border-bottom-right-radius: 1em; | |
border-bottom-right-radius: 1em; | |
} | |
.ui-btn-corner-right { | |
-moz-border-radius-topright: 1em; | |
-webkit-border-top-right-radius: 1em; | |
border-top-right-radius: 1em; | |
-moz-border-radius-bottomright: 1em; | |
-webkit-border-bottom-right-radius: 1em; | |
border-bottom-right-radius: 1em; | |
} | |
.ui-btn-corner-left { | |
-moz-border-radius-topleft: 1em; | |
-webkit-border-top-left-radius: 1em; | |
border-top-left-radius: 1em; | |
-moz-border-radius-bottomleft: 1em; | |
-webkit-border-bottom-left-radius: 1em; | |
border-bottom-left-radius: 1em; | |
} | |
.ui-btn-corner-all { | |
-moz-border-radius: 1em; | |
-webkit-border-radius: 1em; | |
border-radius: 1em; | |
} | |
/* radius clip workaround for cleaning up corner trapping */ | |
.ui-corner-tl, | |
.ui-corner-tr, | |
.ui-corner-bl, | |
.ui-corner-br, | |
.ui-corner-top, | |
.ui-corner-bottom, | |
.ui-corner-right, | |
.ui-corner-left, | |
.ui-corner-all, | |
.ui-btn-corner-tl, | |
.ui-btn-corner-tr, | |
.ui-btn-corner-bl, | |
.ui-btn-corner-br, | |
.ui-btn-corner-top, | |
.ui-btn-corner-bottom, | |
.ui-btn-corner-right, | |
.ui-btn-corner-left, | |
.ui-btn-corner-all { | |
-webkit-background-clip: padding-box; | |
-moz-background-clip: padding-box; | |
background-clip: padding-box; | |
} | |
/* Overlay / modal | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-overlay { | |
background: #666; | |
opacity: .5; | |
filter: Alpha(Opacity=50); | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
} | |
.ui-overlay-shadow { | |
-moz-box-shadow: 0px 0px 12px rgba(0,0,0,.6); | |
-webkit-box-shadow: 0px 0px 12px rgba(0,0,0,.6); | |
box-shadow: 0px 0px 12px rgba(0,0,0,.6); | |
} | |
.ui-shadow { | |
-moz-box-shadow: 0px 1px 4px rgba(0,0,0,.3); | |
-webkit-box-shadow: 0px 1px 4px rgba(0,0,0,.3); | |
box-shadow: 0px 1px 4px rgba(0,0,0,.3); | |
} | |
.ui-bar-a .ui-shadow, | |
.ui-bar-b .ui-shadow , | |
.ui-bar-c .ui-shadow { | |
-moz-box-shadow: 0px 1px 0 rgba(255,255,255,.3); | |
-webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.3); | |
box-shadow: 0px 1px 0 rgba(255,255,255,.3); | |
} | |
.ui-shadow-inset { | |
-moz-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); | |
-webkit-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); | |
box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); | |
} | |
.ui-icon-shadow { | |
-moz-box-shadow: 0px 1px 0 rgba(255,255,255,.4); | |
-webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4); | |
box-shadow: 0px 1px 0 rgba(255,255,255,.4); | |
} | |
/* Focus state - set here for specificity | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-focus { | |
-moz-box-shadow: 0px 0px 12px #387bbe; | |
-webkit-box-shadow: 0px 0px 12px #387bbe; | |
box-shadow: 0px 0px 12px #387bbe; | |
} | |
/* unset box shadow in browsers that don't do it right | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-mobile-nosupport-boxshadow * { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
} | |
/* ...and bring back focus */ | |
.ui-mobile-nosupport-boxshadow .ui-focus { | |
outline-width: 2px; | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. | |
* Note: Code is in draft form and is subject to change | |
*/ | |
/* some unsets - more probably needed */ | |
.ui-mobile, .ui-mobile body { height: 100%; } | |
.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; } | |
.ui-mobile a img, .ui-mobile fieldset { border: 0; } | |
/* responsive page widths */ | |
.ui-mobile-viewport { margin: 0; overflow-x: hidden; -webkit-text-size-adjust: none; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } | |
/* "page" containers - full-screen views, one should always be in view post-pageload */ | |
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; } | |
.ui-mobile .ui-page-active { display: block; overflow: visible; } | |
/*orientations from js are available */ | |
.portrait, | |
.portrait .ui-page { min-height: 420px; } | |
.landscape, | |
.landscape .ui-page { min-height: 300px; } | |
/* loading screen */ | |
.ui-loading .ui-mobile-viewport { overflow: hidden !important; } | |
.ui-loading .ui-loader { display: block; } | |
.ui-loading .ui-page { overflow: hidden; } | |
.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; } | |
.ui-loader h1 { font-size: 15px; text-align: center; } | |
.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; } | |
/*fouc*/ | |
.ui-mobile-rendering > * { visibility: hidden; } | |
/*headers, content panels*/ | |
.ui-bar, .ui-body { position: relative; padding: .4em 15px; overflow: hidden; display: block; clear:both; } | |
.ui-bar { font-size: 16px; margin: 0; } | |
.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; } | |
.ui-header, .ui-footer { display: block; } | |
.ui-page .ui-header, .ui-page .ui-footer { position: relative; } | |
.ui-header .ui-btn-left { position: absolute; left: 10px; top: .4em; } | |
.ui-header .ui-btn-right { position: absolute; right: 10px; top: .4em; } | |
.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 90px .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; } | |
/*content area*/ | |
.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; } | |
.ui-page-fullscreen .ui-content { padding:0; } | |
/* icons sizing */ | |
.ui-icon { width: 18px; height: 18px; } | |
/* fullscreen class on ui-content div */ | |
.ui-fullscreen { } | |
.ui-fullscreen img { max-width: 100%; } | |
/* non-js content hiding */ | |
.ui-nojs { position: absolute; left: -9999px; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.spin { | |
-webkit-transform: rotate(360deg); | |
-webkit-animation-name: spin; | |
-webkit-animation-duration: 1s; | |
-webkit-animation-iteration-count: infinite; | |
} | |
@-webkit-keyframes spin { | |
from {-webkit-transform: rotate(0deg);} | |
to {-webkit-transform: rotate(360deg);} | |
} | |
/* Transitions from jQtouch (with small modifications): http://www.jqtouch.com/ | |
Built by David Kaneda and maintained by Jonathan Stark. | |
*/ | |
.in, .out { | |
-webkit-animation-timing-function: ease-in-out; | |
-webkit-animation-duration: 350ms; | |
} | |
.slide.in { | |
-webkit-transform: translateX(0); | |
-webkit-animation-name: slideinfromright; | |
} | |
.slide.out { | |
-webkit-transform: translateX(-100%); | |
-webkit-animation-name: slideouttoleft; | |
} | |
.slide.in.reverse { | |
-webkit-transform: translateX(0); | |
-webkit-animation-name: slideinfromleft; | |
} | |
.slide.out.reverse { | |
-webkit-transform: translateX(100%); | |
-webkit-animation-name: slideouttoright; | |
} | |
.slideup.in { | |
-webkit-transform: translateY(0); | |
-webkit-animation-name: slideinfrombottom; | |
z-index: 10; | |
} | |
.slideup.out { | |
-webkit-animation-name: dontmove; | |
z-index: 0; | |
} | |
.slideup.out.reverse { | |
-webkit-transform: translateY(100%); | |
z-index: 10; | |
-webkit-animation-name: slideouttobottom; | |
} | |
.slideup.in.reverse { | |
z-index: 0; | |
-webkit-animation-name: dontmove; | |
} | |
.slidedown.in { | |
-webkit-transform: translateY(0); | |
-webkit-animation-name: slideinfromtop; | |
z-index: 10; | |
} | |
.slidedown.out { | |
-webkit-animation-name: dontmove; | |
z-index: 0; | |
} | |
.slidedown.out.reverse { | |
-webkit-transform: translateY(-100%); | |
z-index: 10; | |
-webkit-animation-name: slideouttotop; | |
} | |
.slidedown.in.reverse { | |
z-index: 0; | |
-webkit-animation-name: dontmove; | |
} | |
@-webkit-keyframes slideinfromright { | |
from { -webkit-transform: translateX(100%); } | |
to { -webkit-transform: translateX(0); } | |
} | |
@-webkit-keyframes slideinfromleft { | |
from { -webkit-transform: translateX(-100%); } | |
to { -webkit-transform: translateX(0); } | |
} | |
@-webkit-keyframes slideouttoleft { | |
from { -webkit-transform: translateX(0); } | |
to { -webkit-transform: translateX(-100%); } | |
} | |
@-webkit-keyframes slideouttoright { | |
from { -webkit-transform: translateX(0); } | |
to { -webkit-transform: translateX(100%); } | |
} | |
@-webkit-keyframes slideinfromtop { | |
from { -webkit-transform: translateY(-100%); } | |
to { -webkit-transform: translateY(0); } | |
} | |
@-webkit-keyframes slideinfrombottom { | |
from { -webkit-transform: translateY(100%); } | |
to { -webkit-transform: translateY(0); } | |
} | |
@-webkit-keyframes slideouttobottom { | |
from { -webkit-transform: translateY(0); } | |
to { -webkit-transform: translateY(100%); } | |
} | |
@-webkit-keyframes slideouttotop { | |
from { -webkit-transform: translateY(0); } | |
to { -webkit-transform: translateY(-100%); } | |
} | |
@-webkit-keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@-webkit-keyframes fadeout { | |
from { opacity: 1; } | |
to { opacity: 0; } | |
} | |
.fade.in { | |
opacity: 1; | |
z-index: 10; | |
-webkit-animation-name: fadein; | |
} | |
.fade.out { | |
z-index: 0; | |
-webkit-animation-name: fadeout; | |
} | |
/* The properties in this rule are only necessary for the 'flip' transition. | |
* We need specify the perspective to create a projection matrix. This will add | |
* some depth as the element flips. The depth number represents the distance of | |
* the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate | |
* value. | |
*/ | |
.viewport-flip { | |
-webkit-perspective: 1000; | |
position: absolute; | |
} | |
.ui-mobile-viewport-transitioning, | |
.ui-mobile-viewport-transitioning .ui-page { | |
width: 100%; | |
height: 100%; | |
overflow: hidden; | |
} | |
.flip { | |
-webkit-animation-duration: .65s; | |
-webkit-backface-visibility:hidden; | |
-webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ | |
} | |
.flip.in { | |
-webkit-transform: rotateY(0) scale(1); | |
-webkit-animation-name: flipinfromleft; | |
} | |
.flip.out { | |
-webkit-transform: rotateY(-180deg) scale(.8); | |
-webkit-animation-name: flipouttoleft; | |
} | |
/* Shake it all about */ | |
.flip.in.reverse { | |
-webkit-transform: rotateY(0) scale(1); | |
-webkit-animation-name: flipinfromright; | |
} | |
.flip.out.reverse { | |
-webkit-transform: rotateY(180deg) scale(.8); | |
-webkit-animation-name: flipouttoright; | |
} | |
@-webkit-keyframes flipinfromright { | |
from { -webkit-transform: rotateY(-180deg) scale(.8); } | |
to { -webkit-transform: rotateY(0) scale(1); } | |
} | |
@-webkit-keyframes flipinfromleft { | |
from { -webkit-transform: rotateY(180deg) scale(.8); } | |
to { -webkit-transform: rotateY(0) scale(1); } | |
} | |
@-webkit-keyframes flipouttoleft { | |
from { -webkit-transform: rotateY(0) scale(1); } | |
to { -webkit-transform: rotateY(-180deg) scale(.8); } | |
} | |
@-webkit-keyframes flipouttoright { | |
from { -webkit-transform: rotateY(0) scale(1); } | |
to { -webkit-transform: rotateY(180deg) scale(.8); } | |
} | |
/* Hackish, but reliable. */ | |
@-webkit-keyframes dontmove { | |
from { opacity: 1; } | |
to { opacity: 1; } | |
} | |
.pop { | |
-webkit-transform-origin: 50% 50%; | |
} | |
.pop.in { | |
-webkit-transform: scale(1); | |
opacity: 1; | |
-webkit-animation-name: popin; | |
z-index: 10; | |
} | |
.pop.out.reverse { | |
-webkit-transform: scale(.2); | |
opacity: 0; | |
-webkit-animation-name: popout; | |
z-index: 10; | |
} | |
.pop.in.reverse { | |
z-index: 0; | |
-webkit-animation-name: dontmove; | |
} | |
@-webkit-keyframes popin { | |
from { | |
-webkit-transform: scale(.2); | |
opacity: 0; | |
} | |
to { | |
-webkit-transform: scale(1); | |
opacity: 1; | |
} | |
} | |
@-webkit-keyframes popout { | |
from { | |
-webkit-transform: scale(1); | |
opacity: 1; | |
} | |
to { | |
-webkit-transform: scale(.2); | |
opacity: 0; | |
} | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
/* content configurations. */ | |
.ui-grid-a, .ui-grid-b, .ui-grid-c, .ui-grid-d { overflow: hidden; } | |
.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d, .ui-block-e { margin: 0; padding: 0; border: 0; float: left; min-height:1px;} | |
/* grid solo: 100 - single item fallback */ | |
.ui-grid-solo .ui-block-a { width: 100%; float: none; } | |
/* grid a: 50/50 */ | |
.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 50%; } | |
.ui-grid-a .ui-block-a { clear: left; } | |
/* grid b: 33/33/33 */ | |
.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.333%; } | |
.ui-grid-b .ui-block-a { clear: left; } | |
/* grid c: 25/25/25/25 */ | |
.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 25%; } | |
.ui-grid-c .ui-block-a { clear: left; } | |
/* grid d: 20/20/20/20/20 */ | |
.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 20%; } | |
.ui-grid-d .ui-block-a { clear: left; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
/* fixed page header & footer configuration */ | |
.ui-header, .ui-footer, .ui-page-fullscreen .ui-header, .ui-page-fullscreen .ui-footer { position: absolute; overflow: hidden; width: 100%; border-left-width: 0; border-right-width: 0; } | |
.ui-header-fixed, .ui-footer-fixed { | |
z-index: 1000; | |
-webkit-transform: translateZ(0); /* Force header/footer rendering to go through the same rendering pipeline as native page scrolling. */ | |
} | |
.ui-footer-duplicate, .ui-page-fullscreen .ui-fixed-inline { display: none; } | |
.ui-page-fullscreen .ui-header, .ui-page-fullscreen .ui-footer { opacity: .9; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-navbar { overflow: hidden; } | |
.ui-navbar ul, .ui-navbar-expanded ul { list-style:none; padding: 0; margin: 0; position: relative; display: block; border: 0;} | |
.ui-navbar-collapsed ul { float: left; width: 75%; margin-right: -2px; } | |
.ui-navbar-collapsed .ui-navbar-toggle { float: left; width: 25%; } | |
.ui-navbar li.ui-navbar-truncate { position: absolute; left: -9999px; top: -9999px; } | |
.ui-navbar li .ui-btn, .ui-navbar .ui-navbar-toggle .ui-btn { display: block; font-size: 12px; text-align: center; margin: 0; border-right-width: 0; } | |
.ui-navbar li .ui-btn { margin-right: -1px; } | |
.ui-navbar li .ui-btn:last-child { margin-right: 0; } | |
.ui-header .ui-navbar li .ui-btn, .ui-header .ui-navbar .ui-navbar-toggle .ui-btn, | |
.ui-footer .ui-navbar li .ui-btn, .ui-footer .ui-navbar .ui-navbar-toggle .ui-btn { border-top-width: 0; border-bottom-width: 0; } | |
.ui-navbar .ui-btn-inner { padding-left: 2px; padding-right: 2px; } | |
.ui-navbar-noicons li .ui-btn .ui-btn-inner, .ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner { padding-top: .8em; padding-bottom: .9em; } | |
/*expanded page styles*/ | |
.ui-navbar-expanded .ui-btn { margin: 0; font-size: 14px; } | |
.ui-navbar-expanded .ui-btn-inner { padding-left: 5px; padding-right: 5px; } | |
.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner { padding: 45px 5px 15px; text-align: center; } | |
.ui-navbar-expanded .ui-btn-icon-top .ui-icon { top: 15px; } | |
.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner { padding: 15px 5px 45px; text-align: center; } | |
.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon { bottom: 15px; } | |
.ui-navbar-expanded li .ui-btn .ui-btn-inner { min-height: 2.5em; } | |
.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner { padding-top: 1.8em; padding-bottom: 1.9em; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-btn { display: block; text-align: center; cursor:pointer; position: relative; margin: .5em 5px; padding: 0; } | |
.ui-btn:focus, .ui-btn:active { outline: none; } | |
.ui-header .ui-btn, .ui-footer .ui-btn, .ui-bar .ui-btn { display: inline-block; font-size: 13px; margin: 0; } | |
.ui-btn-inline { display: inline-block; } | |
.ui-btn-inner { padding: .6em 25px; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: relative; } | |
.ui-header .ui-btn-inner, .ui-footer .ui-btn-inner, .ui-bar .ui-btn-inner { padding: .4em 8px .5em; } | |
.ui-btn-icon-notext { display: inline-block; width: 20px; height: 20px; padding: 2px 1px 2px 3px; text-indent: -9999px; } | |
.ui-btn-icon-notext .ui-btn-inner { padding: 0; } | |
.ui-btn-icon-notext .ui-btn-text { position: absolute; left: -999px; } | |
.ui-btn-icon-left .ui-btn-inner { padding-left: 33px; } | |
.ui-header .ui-btn-icon-left .ui-btn-inner, | |
.ui-footer .ui-btn-icon-left .ui-btn-inner, | |
.ui-bar .ui-btn-icon-left .ui-btn-inner { padding-left: 27px; } | |
.ui-btn-icon-right .ui-btn-inner { padding-right: 33px; } | |
.ui-header .ui-btn-icon-right .ui-btn-inner, | |
.ui-footer .ui-btn-icon-right .ui-btn-inner, | |
.ui-bar .ui-btn-icon-right .ui-btn-inner { padding-right: 27px; } | |
.ui-btn-icon-top .ui-btn-inner { padding-top: 33px; } | |
.ui-header .ui-btn-icon-top .ui-btn-inner, | |
.ui-footer .ui-btn-icon-top .ui-btn-inner, | |
.ui-bar .ui-btn-icon-top .ui-btn-inner { padding-top: 27px; } | |
.ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 33px; } | |
.ui-header .ui-btn-icon-bottom .ui-btn-inner, | |
.ui-footer .ui-btn-icon-bottom .ui-btn-inner, | |
.ui-bar .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 27px; } | |
/*btn icon positioning*/ | |
.ui-btn-icon-notext .ui-icon { display: block; } | |
.ui-btn-icon-left .ui-icon, .ui-btn-icon-right .ui-icon { position: absolute; top: 50%; margin-top: -9px; } | |
.ui-btn-icon-top .ui-icon, .ui-btn-icon-bottom .ui-icon { position: absolute; left: 50%; margin-left: -9px; } | |
.ui-btn-icon-left .ui-icon { left: 10px; } | |
.ui-btn-icon-right .ui-icon {right: 10px; } | |
.ui-header .ui-btn-icon-left .ui-icon, | |
.ui-footer .ui-btn-icon-left .ui-icon, | |
.ui-bar .ui-btn-icon-left .ui-icon { left: 4px; } | |
.ui-header .ui-btn-icon-right .ui-icon, | |
.ui-footer .ui-btn-icon-right .ui-icon, | |
.ui-bar .ui-btn-icon-right .ui-icon { right: 4px; } | |
.ui-header .ui-btn-icon-top .ui-icon, | |
.ui-footer .ui-btn-icon-top .ui-icon, | |
.ui-bar .ui-btn-icon-top .ui-icon { top: 4px; } | |
.ui-header .ui-btn-icon-bottom .ui-icon, | |
.ui-footer .ui-btn-icon-bottom .ui-icon, | |
.ui-bar .ui-btn-icon-bottom .ui-icon { bottom: 4px; } | |
.ui-btn-icon-top .ui-icon { top: 5px; } | |
.ui-btn-icon-bottom .ui-icon { bottom: 5px; } | |
/*hiding native button,inputs */ | |
.ui-btn-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-appearance: button; opacity: 0; cursor: pointer; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); background: transparent; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-collapsible-contain { margin: .5em 0; } | |
.ui-collapsible-heading { font-size: 16px; display: block; margin: 0 -8px; padding: 0; border-width: 0 0 1px 0; position: relative; } | |
.ui-collapsible-heading a { text-align: left; margin: 0; } | |
.ui-collapsible-heading a .ui-btn-inner { padding-left: 40px; } | |
.ui-collapsible-heading a span.ui-btn { position: absolute; left: 6px; top: 50%; margin: -12px 0 0 0; width: 20px; height: 20px; padding: 1px 0px 1px 2px; text-indent: -9999px; } | |
.ui-collapsible-heading a span.ui-btn .ui-btn-inner { padding: 10px 0; } | |
.ui-collapsible-heading a span.ui-btn .ui-icon { left: 0; margin-top: -10px; } | |
.ui-collapsible-heading-status { position:absolute; left:-9999px; } | |
.ui-collapsible-content { display: block; padding: 10px 0 10px 8px; } | |
.ui-collapsible-content-collapsed { display: none; } | |
.ui-collapsible-set { margin: .5em 0; } | |
.ui-collapsible-set .ui-collapsible-contain { margin: -1px 0 0; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-controlgroup, fieldset.ui-controlgroup { padding: 0; margin: .5em 0 1em; } | |
.ui-bar .ui-controlgroup { margin: 0 .3em; } | |
.ui-controlgroup-label { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; } | |
.ui-controlgroup-controls { display: block; width: 95%;} | |
.ui-controlgroup li { list-style: none; } | |
.ui-controlgroup-vertical .ui-btn, | |
.ui-controlgroup-vertical .ui-checkbox, .ui-controlgroup-vertical .ui-radio { margin: 0; border-bottom-width: 0; } | |
.ui-controlgroup-vertical .ui-controlgroup-last { border-bottom-width: 1px; } | |
.ui-controlgroup-horizontal { padding: 0; } | |
.ui-controlgroup-horizontal .ui-btn, | |
.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio { display: inline-block; margin: 0 -5px 0 0; } | |
.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio { display: inline; } | |
.ui-controlgroup-horizontal .ui-checkbox .ui-btn, .ui-controlgroup-horizontal .ui-radio .ui-btn, | |
.ui-controlgroup-horizontal .ui-checkbox:last-child, .ui-controlgroup-horizontal .ui-radio:last-child { margin-right: 0; } | |
.ui-controlgroup-horizontal .ui-controlgroup-last { margin-right: 0; } | |
.ui-controlgroup .ui-checkbox label, .ui-controlgroup .ui-radio label { font-size: 16px; } | |
/* conflicts with listview.. | |
.ui-controlgroup .ui-btn-icon-notext { width: 30px; height: 30px; text-indent: -9999px; } | |
.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner { padding: 5px 6px 5px 5px; } | |
*/ | |
@media all and (min-width: 450px){ | |
.ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
.ui-controlgroup-controls { width: 60%; display: inline-block; } | |
} /* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-dialog { min-height: 480px; } | |
.ui-dialog .ui-header, .ui-dialog .ui-content, .ui-dialog .ui-footer { margin: 15px; position: relative; } | |
.ui-dialog .ui-header, .ui-dialog .ui-footer { z-index: 10; width: auto; } | |
.ui-dialog .ui-content, .ui-dialog .ui-footer { margin-top: -15px; }/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-checkbox, .ui-radio { position:relative; margin: .2em 0 .5em; z-index: 1; } | |
.ui-checkbox .ui-btn, .ui-radio .ui-btn { margin: 0; text-align: left; z-index: 2; } | |
.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner { white-space: normal; } | |
.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner { padding-left: 45px; } | |
.ui-checkbox .ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } | |
.ui-checkbox .ui-icon, .ui-radio .ui-icon { top: 1.1em; } | |
.ui-checkbox .ui-btn-icon-left .ui-icon, .ui-radio .ui-btn-icon-left .ui-icon {left: 15px; } | |
.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon {right: 15px; } | |
/* input, label positioning */ | |
.ui-checkbox input,.ui-radio input { position:absolute; left:20px; top:50%; width: 10px; height: 10px; margin:-5px 0 0 0; outline: 0 !important; z-index: 1; }/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-field-contain { background: none; padding: 1.5em 0; margin: 0; border-bottom-width: 1px; overflow: visible; } | |
.ui-field-contain:first-child { border-top-width: 0; } | |
@media all and (min-width: 450px){ | |
.ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; } | |
} /* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-select { display: block; position: relative; } | |
.ui-select select { position: absolute; left: -9999px; top: -9999px; } | |
.ui-select .ui-btn { overflow: hidden; } | |
.ui-select .ui-btn select { cursor: pointer; -webkit-appearance: button; left: 0; top:0; width: 100%; height: 100%; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } | |
@-moz-document url-prefix() {.ui-select .ui-btn select { opacity: 0.0001; }} | |
.ui-select .ui-btn select.ui-select-nativeonly { opacity: 1; text-indent: 0; } | |
.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } | |
.ui-select .ui-btn-icon-right .ui-icon { right: 15px; } | |
/* labels */ | |
label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; } | |
/*listbox*/ | |
.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: inline-block; min-height: 1em; } | |
.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden; display: block;} | |
.ui-selectmenu { position: absolute; padding: 0; z-index: 100 !important; width: 80%; max-width: 350px; padding: 6px; } | |
.ui-selectmenu .ui-listview { margin: 0; } | |
.ui-selectmenu .ui-btn.ui-li-divider { cursor: default; } | |
.ui-selectmenu-hidden { top: -9999px; left: -9999px; } | |
.ui-selectmenu-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 99; } | |
.ui-screen-hidden, .ui-selectmenu-list .ui-li .ui-icon { display: none; } | |
.ui-selectmenu-list .ui-li .ui-icon { display: block; } | |
.ui-li.ui-selectmenu-placeholder { display: none; } | |
.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; } | |
@media all and (min-width: 450px){ | |
label.ui-select { display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
.ui-select { width: 60%; display: inline-block; } | |
} | |
/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button. this shim's content in there */ | |
.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; }/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
label.ui-input-text { font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; } | |
input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; line-height: 1.4; font-size: 16px; display: block; width: 95%; } | |
input.ui-input-text { -webkit-appearance: none; } | |
textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear; -moz-transition: height 200ms linear; -o-transition: height 200ms linear; transition: height 200ms linear; } | |
.ui-input-search { padding: 0 30px; width: 77%; background-position: 8px 50%; background-repeat: no-repeat; position: relative; } | |
.ui-input-search input.ui-input-text { border: none; width: 98%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; } | |
.ui-input-search .ui-input-clear { position: absolute; right: 0; top: 50%; margin-top: -14px; } | |
.ui-input-search .ui-input-clear-hidden { display: none; } | |
/* orientation adjustments - incomplete!*/ | |
@media all and (min-width: 450px){ | |
label.ui-input-text { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0 } | |
input.ui-input-text, | |
textarea.ui-input-text, | |
.ui-input-search { width: 60%; display: inline-block; } | |
.ui-input-search { width: 50%; } | |
.ui-input-search input.ui-input-text { width: 98%; /*echos rule from above*/ } | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-listview { margin: 0; counter-reset: listnumbering; } | |
.ui-content .ui-listview { margin: -15px; } | |
.ui-content .ui-listview-inset { margin: 1em 0; } | |
.ui-listview, .ui-li { list-style:none; padding:0; } | |
.ui-li, .ui-li.ui-field-contain { display: block; margin:0; position: relative; overflow: visible; text-align: left; border-width: 0; border-top-width: 1px; } | |
.ui-li .ui-btn-text a.ui-link-inherit { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } | |
.ui-li-divider, .ui-li-static { padding: .5em 15px; font-size: 14px; font-weight: bold; } | |
.ui-li-divider { counter-reset: listnumbering; } | |
ol.ui-listview .ui-link-inherit:before, ol.ui-listview .ui-li-static:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal;counter-increment: listnumbering; content: counter(listnumbering) ". "; } | |
ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid chance of duplication */ | |
.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; } | |
.ui-li:last-child, .ui-li.ui-field-contain:last-child { border-bottom-width: 1px; } | |
.ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; } | |
.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 75px .7em 15px; display: block; } | |
.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb { min-height: 60px; padding-left: 100px; } | |
.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon { min-height: 20px; padding-left: 40px; } | |
.ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } | |
.ui-li-desc { font-size: 12px; font-weight: normal; display: block; margin: -.5em 0 .6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } | |
.ui-li-thumb, .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; } | |
.ui-li-icon { max-height: 40px; max-width: 40px; left: 10px; top: .9em; } | |
.ui-li-thumb, .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; } | |
.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; } | |
@media all and (min-width: 480px){ | |
.ui-li-aside { width: 45%; } | |
} | |
.ui-li-divider { cursor: default; } | |
.ui-li-has-alt .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt { padding-right: 95px; } | |
.ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 38px; } | |
.ui-li-divider .ui-li-count, .ui-li-static .ui-li-count { right: 10px; } | |
.ui-li-has-alt .ui-li-count { right: 55px; } | |
.ui-li-link-alt { position: absolute; width: 40px; height: 100%; border-width: 0; border-left-width: 1px; top: 0; right: 0; margin: 0; padding: 0; } | |
.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 8px; top: 50%; margin: -11px 0 0 0; border-bottom-width: 1px; } | |
.ui-li-link-alt .ui-btn-inner { padding: 0; position: static; } | |
.ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px; } | |
.ui-listview-filter { border-width: 0; overflow: hidden; margin: -15px -15px 15px -15px } | |
.ui-listview-filter .ui-input-search { margin: 5px; width: auto; display: block; } | |
.ui-listview-filter-inset { margin: -15px -5px -15px -5px; background: transparent; } | |
.ui-li.ui-screen-hidden{display:none;} | |
/* Odd iPad positioning issue. */ | |
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { | |
.ui-li .ui-btn-text { overflow: visible; } | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
label.ui-slider { display: block; } | |
input.ui-slider-input { display: inline-block; width: 50px; } | |
select.ui-slider-switch { display: none; } | |
div.ui-slider { position: relative; display: inline-block; overflow: visible; height: 15px; padding: 0; margin: 0 2% 0 20px; top: 4px; width: 66%; } | |
a.ui-slider-handle { position: absolute; z-index: 10; top: 50%; width: 28px; height: 28px; margin-top: -15px; margin-left: -15px; } | |
a.ui-slider-handle .ui-btn-inner { padding-left: 0; padding-right: 0; } | |
@media all and (min-width: 480px){ | |
label.ui-slider { display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
div.ui-slider { width: 45%; } | |
} | |
div.ui-slider-switch { height: 32px; overflow: hidden; margin-left: 0; } | |
div.ui-slider-inneroffset { margin-left: 50%; position: absolute; top: 1px; height: 100%; width: 50%; } | |
div.ui-slider-handle-snapping { -webkit-transition: left 100ms linear; } | |
div.ui-slider-labelbg { position: absolute; top:0; margin: 0; border-width: 0; } | |
div.ui-slider-switch div.ui-slider-labelbg-a { width: 60%; height: 100%; left: 0; } | |
div.ui-slider-switch div.ui-slider-labelbg-b { width: 60%; height: 100%; right: 0; } | |
.ui-slider-switch-a div.ui-slider-labelbg-a, .ui-slider-switch-b div.ui-slider-labelbg-b { z-index: -1; } | |
.ui-slider-switch-a div.ui-slider-labelbg-b, .ui-slider-switch-b div.ui-slider-labelbg-a { z-index: 0; } | |
div.ui-slider-switch a.ui-slider-handle { z-index: 20; width: 101%; height: 32px; margin-top: -18px; margin-left: -101%; } | |
span.ui-slider-label { width: 100%; position: absolute;height: 32px; font-size: 16px; text-align: center; line-height: 2; background: none; border-color: transparent; } | |
span.ui-slider-label-a { left: -100%; margin-right: -1px } | |
span.ui-slider-label-b { right: -100%; margin-left: -1px } | |
/*! | |
* jQuery Mobile v1.0b2 | |
* http://jquerymobile.com/ | |
* | |
* Copyright 2010, jQuery Project | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
*/ | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
/* A | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-a { | |
border: 1px solid #2A2A2A; | |
background: #111111; | |
color: #ffffff; | |
font-weight: bold; | |
text-shadow: 0 -1px 1px #000000; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#111)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #3c3c3c, #111); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #3c3c3c, #111); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #3c3c3c, #111); /* IE10 */ | |
background-image: -o-linear-gradient(top, #3c3c3c, #111); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #3c3c3c, #111); | |
} | |
.ui-bar-a, | |
.ui-bar-a input, | |
.ui-bar-a select, | |
.ui-bar-a textarea, | |
.ui-bar-a button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-a .ui-link-inherit { | |
color: #fff; | |
} | |
.ui-bar-a .ui-link { | |
color: #7cc4e7; | |
font-weight: bold; | |
} | |
.ui-body-a { | |
border: 1px solid #2A2A2A; | |
background: #222222; | |
color: #fff; | |
text-shadow: 0 1px 0 #000; | |
font-weight: normal; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#666), to(#222)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #666, #222); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #666, #222); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #666, #222); /* IE10 */ | |
background-image: -o-linear-gradient(top, #666, #222); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #666, #222); | |
} | |
.ui-body-a, | |
.ui-body-a input, | |
.ui-body-a select, | |
.ui-body-a textarea, | |
.ui-body-a button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-a .ui-link-inherit { | |
color: #fff; | |
} | |
.ui-body-a .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-br { | |
border-bottom: rgb(130,130,130); | |
border-bottom: rgba(130,130,130,.3); | |
border-bottom-width: 1px; | |
border-bottom-style: solid; | |
} | |
.ui-btn-up-a { | |
border: 1px solid #222; | |
background: #333333; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #000; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#555), to(#333)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #555, #333); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #555, #333); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #555, #333); /* IE10 */ | |
background-image: -o-linear-gradient(top, #555, #333); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #555, #333); | |
} | |
.ui-btn-up-a a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-hover-a { | |
border: 1px solid #000; | |
background: #444444; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #000; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#666), to(#444)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #666, #444); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #666, #444); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #666, #444); /* IE10 */ | |
background-image: -o-linear-gradient(top, #666, #444); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #666, #444); | |
} | |
.ui-btn-hover-a a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-down-a { | |
border: 1px solid #000; | |
background: #3d3d3d; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #000; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#333), to(#5a5a5a)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #333, #5a5a5a); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #333, #5a5a5a); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #333, #5a5a5a); /* IE10 */ | |
background-image: -o-linear-gradient(top, #333, #5a5a5a); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #333, #5a5a5a); | |
} | |
.ui-btn-down-a a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-up-a, | |
.ui-btn-hover-a, | |
.ui-btn-down-a { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* B | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-b { | |
border: 1px solid #456f9a; | |
background: #5e87b0; | |
color: #fff; | |
font-weight: bold; | |
text-shadow: 0 -1px 1px #254f7a; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#81a8ce), to(#5e87b0)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #81a8ce, #5e87b0); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #81a8ce, #5e87b0); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #81a8ce, #5e87b0); /* IE10 */ | |
background-image: -o-linear-gradient(top, #81a8ce, #5e87b0); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #81a8ce, #5e87b0); | |
} | |
.ui-bar-b, | |
.ui-bar-b input, | |
.ui-bar-b select, | |
.ui-bar-b textarea, | |
.ui-bar-b button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-b .ui-link-inherit { | |
color: #fff; | |
} | |
.ui-bar-b .ui-link { | |
color: #7cc4e7; | |
font-weight: bold; | |
} | |
.ui-body-b { | |
border: 1px solid #C6C6C6; | |
background: #cccccc; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
font-weight: normal; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6), to(#ccc)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #e6e6e6, #ccc); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #e6e6e6, #ccc); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #e6e6e6, #ccc); /* IE10 */ | |
background-image: -o-linear-gradient(top, #e6e6e6, #ccc); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #e6e6e6, #ccc); | |
} | |
.ui-body-b, | |
.ui-body-b input, | |
.ui-body-b select, | |
.ui-body-b textarea, | |
.ui-body-b button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-b .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-b .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-b { | |
border: 1px solid #145072; | |
background: #2567ab; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #145072; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#5f9cc5), to(#396b9e)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #5f9cc5, #396b9e); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #5f9cc5, #396b9e); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #5f9cc5, #396b9e); /* IE10 */ | |
background-image: -o-linear-gradient(top, #5f9cc5, #396b9e); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #5f9cc5, #396b9e); | |
} | |
.ui-btn-up-b a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-hover-b { | |
border: 1px solid #00516e; | |
background: #4b88b6; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #014D68; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#72b0d4), to(#4b88b6)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #72b0d4, #4b88b6); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #72b0d4, #4b88b6); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #72b0d4, #4b88b6); /* IE10 */ | |
background-image: -o-linear-gradient(top, #72b0d4, #4b88b6); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #72b0d4, #4b88b6); | |
} | |
.ui-btn-hover-b a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-down-b { | |
border: 1px solid #225377; | |
background: #4e89c5; | |
font-weight: bold; | |
color: #fff; | |
text-shadow: 0 -1px 1px #225377; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#396b9e), to(#4e89c5)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #396b9e, #4e89c5); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #396b9e, #4e89c5); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #396b9e, #4e89c5); /* IE10 */ | |
background-image: -o-linear-gradient(top, #396b9e, #4e89c5); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #396b9e, #4e89c5); | |
} | |
.ui-btn-down-b a.ui-link-inherit { | |
color: #fff; | |
} | |
.ui-btn-up-b, | |
.ui-btn-hover-b, | |
.ui-btn-down-b { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* C | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-c { | |
border: 1px solid #B3B3B3; | |
background: #e9eaeb; | |
color: #3E3E3E; | |
font-weight: bold; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#e9eaeb)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #f0f0f0, #e9eaeb); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #f0f0f0, #e9eaeb); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #f0f0f0, #e9eaeb); /* IE10 */ | |
background-image: -o-linear-gradient(top, #f0f0f0, #e9eaeb); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #f0f0f0, #e9eaeb); | |
} | |
.ui-bar-c, | |
.ui-bar-c input, | |
.ui-bar-c select, | |
.ui-bar-c textarea, | |
.ui-bar-c button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-c { | |
border: 1px solid #B3B3B3; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
background: #f0f0f0; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ddd)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #eee, #ddd); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #eee, #ddd); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #eee, #ddd); /* IE10 */ | |
background-image: -o-linear-gradient(top, #eee, #ddd); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #eee, #ddd); | |
} | |
.ui-body-c, | |
.ui-body-c input, | |
.ui-body-c select, | |
.ui-body-c textarea, | |
.ui-body-c button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-c .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-c .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-c { | |
border: 1px solid #ccc; | |
background: #eee; | |
font-weight: bold; | |
color: #444; | |
text-shadow: 0 1px 1px #f6f6f6; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#eee)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fdfdfd, #eee); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fdfdfd, #eee); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fdfdfd, #eee); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fdfdfd, #eee); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fdfdfd, #eee); | |
} | |
.ui-btn-up-c a.ui-link-inherit { | |
color: #2F3E46; | |
} | |
.ui-btn-hover-c { | |
border: 1px solid #bbb; | |
background: #dadada; | |
font-weight: bold; | |
color: #101010; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#dadada)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #ededed, #dadada); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #ededed, #dadada); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #ededed, #dadada); /* IE10 */ | |
background-image: -o-linear-gradient(top, #ededed, #dadada); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #ededed, #dadada); | |
} | |
.ui-btn-hover-c a.ui-link-inherit { | |
color: #2F3E46; | |
} | |
.ui-btn-down-c { | |
border: 1px solid #808080; | |
background: #fdfdfd; | |
font-weight: bold; | |
color: #111111; | |
text-shadow: 0 1px 1px #ffffff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#fdfdfd)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #eee, #fdfdfd); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #eee, #fdfdfd); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #eee, #fdfdfd); /* IE10 */ | |
background-image: -o-linear-gradient(top, #eee, #fdfdfd); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #eee, #fdfdfd); | |
} | |
.ui-btn-down-c a.ui-link-inherit { | |
color: #2F3E46; | |
} | |
.ui-btn-up-c, | |
.ui-btn-hover-c, | |
.ui-btn-down-c { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* D | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-d { | |
border: 1px solid #ccc; | |
background: #bbb; | |
color: #333; | |
text-shadow: 0 1px 0 #eee; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#ddd), to(#bbb)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #ddd, #bbb); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #ddd, #bbb); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #ddd, #bbb); /* IE10 */ | |
background-image: -o-linear-gradient(top, #ddd, #bbb); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #ddd, #bbb); | |
} | |
.ui-bar-d, | |
.ui-bar-d input, | |
.ui-bar-d select, | |
.ui-bar-d textarea, | |
.ui-bar-d button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-d .ui-link-inherit { | |
color: #333; | |
} | |
.ui-bar-d .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-body-d { | |
border: 1px solid #ccc; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
background: #ffffff; | |
} | |
.ui-body-d, | |
.ui-body-d input, | |
.ui-body-d select, | |
.ui-body-d textarea, | |
.ui-body-d button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-d .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-d .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-d { | |
border: 1px solid #ccc; | |
background: #fff; | |
font-weight: bold; | |
color: #444; | |
text-shadow: 0 1px 1px #fff; | |
} | |
.ui-btn-up-d a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-hover-d { | |
border: 1px solid #aaa; | |
background: #eeeeee; | |
font-weight: bold; | |
color: #222; | |
cursor: pointer; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#eee)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fdfdfd, #eee); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fdfdfd, #eee); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fdfdfd, #eee); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fdfdfd, #eee); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fdfdfd, #eee); | |
} | |
.ui-btn-hover-d a.ui-link-inherit { | |
color: #222; | |
} | |
.ui-btn-down-d { | |
border: 1px solid #aaaaaa; | |
background: #ffffff; | |
font-weight: bold; | |
color: #111; | |
text-shadow: 0 1px 1px #ffffff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#fff)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #eee, #fff); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #eee, #fff); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #eee, #fff); /* IE10 */ | |
background-image: -o-linear-gradient(top, #eee, #fff); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #eee, #fff); | |
} | |
.ui-btn-down-d a.ui-link-inherit { | |
color: #111; | |
} | |
.ui-btn-up-d, | |
.ui-btn-hover-d, | |
.ui-btn-down-d { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* E | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-e { | |
border: 1px solid #F7C942; | |
background: #fadb4e; | |
color: #333; | |
text-shadow: 0 1px 0 #fff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fceda7), to(#fadb4e)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fceda7, #fadb4e); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fceda7, #fadb4e); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fceda7, #fadb4e); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fceda7, #fadb4e); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fceda7, #fadb4e); | |
} | |
.ui-bar-e, | |
.ui-bar-e input, | |
.ui-bar-e select, | |
.ui-bar-e textarea, | |
.ui-bar-e button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-bar-e .ui-link-inherit { | |
color: #333; | |
} | |
.ui-bar-e .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-body-e { | |
border: 1px solid #F7C942; | |
color: #333333; | |
text-shadow: 0 1px 0 #fff; | |
background: #faeb9e; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#faeb9e)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fff, #faeb9e); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fff, #faeb9e); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fff, #faeb9e); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fff, #faeb9e); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fff, #faeb9e); | |
} | |
.ui-body-e, | |
.ui-body-e input, | |
.ui-body-e select, | |
.ui-body-e textarea, | |
.ui-body-e button { | |
font-family: Helvetica, Arial, sans-serif; | |
} | |
.ui-body-e .ui-link-inherit { | |
color: #333333; | |
} | |
.ui-body-e .ui-link { | |
color: #2489CE; | |
font-weight: bold; | |
} | |
.ui-btn-up-e { | |
border: 1px solid #F7C942; | |
background: #fadb4e; | |
font-weight: bold; | |
color: #333; | |
text-shadow: 0 1px 0 #fff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fceda7), to(#fadb4e)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fceda7, #fadb4e); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fceda7, #fadb4e); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fceda7, #fadb4e); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fceda7, #fadb4e); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fceda7, #fadb4e); | |
} | |
.ui-btn-up-e a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-hover-e { | |
border: 1px solid #e79952; | |
background: #fbe26f; | |
font-weight: bold; | |
color: #111; | |
text-shadow: 0 1px 1px #fff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf0b5), to(#fbe26f)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fcf0b5, #fbe26f); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fcf0b5, #fbe26f); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fcf0b5, #fbe26f); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fcf0b5, #fbe26f); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fcf0b5, #fbe26f); | |
} | |
.ui-btn-hover-e a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-down-e { | |
border: 1px solid #F7C942; | |
background: #fceda7; | |
font-weight: bold; | |
color: #111; | |
text-shadow: 0 1px 1px #ffffff; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#fadb4e), to(#fceda7)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #fadb4e, #fceda7); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #fadb4e, #fceda7); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #fadb4e, #fceda7); /* IE10 */ | |
background-image: -o-linear-gradient(top, #fadb4e, #fceda7); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #fadb4e, #fceda7); | |
} | |
.ui-btn-down-e a.ui-link-inherit { | |
color: #333; | |
} | |
.ui-btn-up-e, | |
.ui-btn-hover-e, | |
.ui-btn-down-e { | |
font-family: Helvetica, Arial, sans-serif; | |
text-decoration: none; | |
} | |
/* links within "buttons" | |
-----------------------------------------------------------------------------------------------------------*/ | |
a.ui-link-inherit { | |
text-decoration: none !important; | |
} | |
/* Active class used as the "on" state across all themes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-active { | |
border: 1px solid #155678; | |
background: #4596ce; | |
font-weight: bold; | |
color: #fff; | |
cursor: pointer; | |
text-shadow: 0 -1px 1px #145072; | |
text-decoration: none; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#85bae4), to(#5393c5)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, #85bae4, #5393c5); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient(top, #85bae4, #5393c5); /* FF3.6 */ | |
background-image: -ms-linear-gradient(top, #85bae4, #5393c5); /* IE10 */ | |
background-image: -o-linear-gradient(top, #85bae4, #5393c5); /* Opera 11.10+ */ | |
background-image: linear-gradient(top, #85bae4, #5393c5); | |
outline: none; | |
} | |
.ui-btn-active a.ui-link-inherit { | |
color: #fff; | |
} | |
/* button inner top highlight | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-inner { | |
border-top: 1px solid #fff; | |
border-color: rgba(255,255,255,.3); | |
} | |
/* corner rounding classes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-corner-tl { | |
-moz-border-radius-topleft: .6em; | |
-webkit-border-top-left-radius: .6em; | |
border-top-left-radius: .6em; | |
} | |
.ui-corner-tr { | |
-moz-border-radius-topright: .6em; | |
-webkit-border-top-right-radius: .6em; | |
border-top-right-radius: .6em; | |
} | |
.ui-corner-bl { | |
-moz-border-radius-bottomleft: .6em; | |
-webkit-border-bottom-left-radius: .6em; | |
border-bottom-left-radius: .6em; | |
} | |
.ui-corner-br { | |
-moz-border-radius-bottomright: .6em; | |
-webkit-border-bottom-right-radius: .6em; | |
border-bottom-right-radius: .6em; | |
} | |
.ui-corner-top { | |
-moz-border-radius-topleft: .6em; | |
-webkit-border-top-left-radius: .6em; | |
border-top-left-radius: .6em; | |
-moz-border-radius-topright: .6em; | |
-webkit-border-top-right-radius: .6em; | |
border-top-right-radius: .6em; | |
} | |
.ui-corner-bottom { | |
-moz-border-radius-bottomleft: .6em; | |
-webkit-border-bottom-left-radius: .6em; | |
border-bottom-left-radius: .6em; | |
-moz-border-radius-bottomright: .6em; | |
-webkit-border-bottom-right-radius: .6em; | |
border-bottom-right-radius: .6em; | |
} | |
.ui-corner-right { | |
-moz-border-radius-topright: .6em; | |
-webkit-border-top-right-radius: .6em; | |
border-top-right-radius: .6em; | |
-moz-border-radius-bottomright: .6em; | |
-webkit-border-bottom-right-radius: .6em; | |
border-bottom-right-radius: .6em; | |
} | |
.ui-corner-left { | |
-moz-border-radius-topleft: .6em; | |
-webkit-border-top-left-radius: .6em; | |
border-top-left-radius: .6em; | |
-moz-border-radius-bottomleft: .6em; | |
-webkit-border-bottom-left-radius: .6em; | |
border-bottom-left-radius: .6em; | |
} | |
.ui-corner-all { | |
-moz-border-radius: .6em; | |
-webkit-border-radius: .6em; | |
border-radius: .6em; | |
} | |
/* Interaction cues | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-disabled { | |
opacity: .3; | |
} | |
.ui-disabled, | |
.ui-disabled a { | |
cursor: default; | |
} | |
/* Icons | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon { | |
background: #666; | |
background: rgba(0,0,0,.4); | |
background-image: url(images/icons-18-white.png); | |
background-repeat: no-repeat; | |
-moz-border-radius: 9px; | |
-webkit-border-radius: 9px; | |
border-radius: 9px; | |
} | |
/* Alt icon color | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon-alt { | |
background: #fff; | |
background: rgba(255,255,255,.3); | |
background-image: url(images/icons-18-black.png); | |
background-repeat: no-repeat; | |
} | |
/* HD/"retina" sprite | |
-----------------------------------------------------------------------------------------------------------*/ | |
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), | |
only screen and (min--moz-device-pixel-ratio: 1.5), | |
only screen and (min-resolution: 240dpi) { | |
.ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r, | |
.ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check, | |
.ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back, | |
.ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-search, | |
.ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on { | |
background-image: url(images/icons-36-white.png); | |
-moz-background-size: 776px 18px; | |
-o-background-size: 776px 18px; | |
-webkit-background-size: 776px 18px; | |
background-size: 776px 18px; | |
} | |
.ui-icon-alt { | |
background-image: url(images/icons-36-black.png); | |
} | |
} | |
/* plus minus */ | |
.ui-icon-plus { | |
background-position: -0 50%; | |
} | |
.ui-icon-minus { | |
background-position: -36px 50%; | |
} | |
/* delete/close */ | |
.ui-icon-delete { | |
background-position: -72px 50%; | |
} | |
/* arrows */ | |
.ui-icon-arrow-r { | |
background-position: -108px 50%; | |
} | |
.ui-icon-arrow-l { | |
background-position: -144px 50%; | |
} | |
.ui-icon-arrow-u { | |
background-position: -180px 50%; | |
} | |
.ui-icon-arrow-d { | |
background-position: -216px 50%; | |
} | |
/* misc */ | |
.ui-icon-check { | |
background-position: -252px 50%; | |
} | |
.ui-icon-gear { | |
background-position: -288px 50%; | |
} | |
.ui-icon-refresh { | |
background-position: -324px 50%; | |
} | |
.ui-icon-forward { | |
background-position: -360px 50%; | |
} | |
.ui-icon-back { | |
background-position: -396px 50%; | |
} | |
.ui-icon-grid { | |
background-position: -432px 50%; | |
} | |
.ui-icon-star { | |
background-position: -468px 50%; | |
} | |
.ui-icon-alert { | |
background-position: -504px 50%; | |
} | |
.ui-icon-info { | |
background-position: -540px 50%; | |
} | |
.ui-icon-home { | |
background-position: -576px 50%; | |
} | |
.ui-icon-search { | |
background-position: -612px 50%; | |
} | |
.ui-icon-checkbox-off { | |
background-position: -684px 50%; | |
} | |
.ui-icon-checkbox-on { | |
background-position: -648px 50%; | |
} | |
.ui-icon-radio-off { | |
background-position: -756px 50%; | |
} | |
.ui-icon-radio-on { | |
background-position: -720px 50%; | |
} | |
/* checks,radios */ | |
.ui-checkbox .ui-icon { | |
-moz-border-radius: 3px; | |
-webkit-border-radius: 3px; | |
border-radius: 3px; | |
} | |
.ui-icon-checkbox-off, | |
.ui-icon-radio-off { | |
background-color: transparent; | |
} | |
.ui-checkbox-on .ui-icon, | |
.ui-radio-on .ui-icon { | |
background-color: #4596ce; /* NOTE: this hex should match the active state color. It's repeated here for cascade */ | |
} | |
.ui-icon-searchfield { | |
background-image: url(images/icon-search-black.png); | |
background-size: 16px 16px; | |
} | |
/* loading icon */ | |
.ui-icon-loading { | |
background-image: url(images/ajax-loader.png); | |
width: 40px; | |
height: 40px; | |
-moz-border-radius: 20px; | |
-webkit-border-radius: 20px; | |
border-radius: 20px; | |
background-size: 35px 35px; | |
} | |
/* Button corner classes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-corner-tl { | |
-moz-border-radius-topleft: 1em; | |
-webkit-border-top-left-radius: 1em; | |
border-top-left-radius: 1em; | |
} | |
.ui-btn-corner-tr { | |
-moz-border-radius-topright: 1em; | |
-webkit-border-top-right-radius: 1em; | |
border-top-right-radius: 1em; | |
} | |
.ui-btn-corner-bl { | |
-moz-border-radius-bottomleft: 1em; | |
-webkit-border-bottom-left-radius: 1em; | |
border-bottom-left-radius: 1em; | |
} | |
.ui-btn-corner-br { | |
-moz-border-radius-bottomright: 1em; | |
-webkit-border-bottom-right-radius: 1em; | |
border-bottom-right-radius: 1em; | |
} | |
.ui-btn-corner-top { | |
-moz-border-radius-topleft: 1em; | |
-webkit-border-top-left-radius: 1em; | |
border-top-left-radius: 1em; | |
-moz-border-radius-topright: 1em; | |
-webkit-border-top-right-radius: 1em; | |
border-top-right-radius: 1em; | |
} | |
.ui-btn-corner-bottom { | |
-moz-border-radius-bottomleft: 1em; | |
-webkit-border-bottom-left-radius: 1em; | |
border-bottom-left-radius: 1em; | |
-moz-border-radius-bottomright: 1em; | |
-webkit-border-bottom-right-radius: 1em; | |
border-bottom-right-radius: 1em; | |
} | |
.ui-btn-corner-right { | |
-moz-border-radius-topright: 1em; | |
-webkit-border-top-right-radius: 1em; | |
border-top-right-radius: 1em; | |
-moz-border-radius-bottomright: 1em; | |
-webkit-border-bottom-right-radius: 1em; | |
border-bottom-right-radius: 1em; | |
} | |
.ui-btn-corner-left { | |
-moz-border-radius-topleft: 1em; | |
-webkit-border-top-left-radius: 1em; | |
border-top-left-radius: 1em; | |
-moz-border-radius-bottomleft: 1em; | |
-webkit-border-bottom-left-radius: 1em; | |
border-bottom-left-radius: 1em; | |
} | |
.ui-btn-corner-all { | |
-moz-border-radius: 1em; | |
-webkit-border-radius: 1em; | |
border-radius: 1em; | |
} | |
/* radius clip workaround for cleaning up corner trapping */ | |
.ui-corner-tl, | |
.ui-corner-tr, | |
.ui-corner-bl, | |
.ui-corner-br, | |
.ui-corner-top, | |
.ui-corner-bottom, | |
.ui-corner-right, | |
.ui-corner-left, | |
.ui-corner-all, | |
.ui-btn-corner-tl, | |
.ui-btn-corner-tr, | |
.ui-btn-corner-bl, | |
.ui-btn-corner-br, | |
.ui-btn-corner-top, | |
.ui-btn-corner-bottom, | |
.ui-btn-corner-right, | |
.ui-btn-corner-left, | |
.ui-btn-corner-all { | |
-webkit-background-clip: padding-box; | |
-moz-background-clip: padding; | |
background-clip: padding-box; | |
} | |
/* Overlay / modal | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-overlay { | |
background: #666; | |
opacity: .5; | |
filter: Alpha(Opacity=50); | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
} | |
.ui-overlay-shadow { | |
-moz-box-shadow: 0px 0px 12px rgba(0,0,0,.6); | |
-webkit-box-shadow: 0px 0px 12px rgba(0,0,0,.6); | |
box-shadow: 0px 0px 12px rgba(0,0,0,.6); | |
} | |
.ui-shadow { | |
-moz-box-shadow: 0px 1px 4px rgba(0,0,0,.3); | |
-webkit-box-shadow: 0px 1px 4px rgba(0,0,0,.3); | |
box-shadow: 0px 1px 4px rgba(0,0,0,.3); | |
} | |
.ui-bar-a .ui-shadow, | |
.ui-bar-b .ui-shadow , | |
.ui-bar-c .ui-shadow { | |
-moz-box-shadow: 0px 1px 0 rgba(255,255,255,.3); | |
-webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.3); | |
box-shadow: 0px 1px 0 rgba(255,255,255,.3); | |
} | |
.ui-shadow-inset { | |
-moz-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); | |
-webkit-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); | |
box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); | |
} | |
.ui-icon-shadow { | |
-moz-box-shadow: 0px 1px 0 rgba(255,255,255,.4); | |
-webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4); | |
box-shadow: 0px 1px 0 rgba(255,255,255,.4); | |
} | |
/* Focus state - set here for specificity | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-focus { | |
-moz-box-shadow: 0px 0px 12px #387bbe; | |
-webkit-box-shadow: 0px 0px 12px #387bbe; | |
box-shadow: 0px 0px 12px #387bbe; | |
} | |
/* unset box shadow in browsers that don't do it right | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-mobile-nosupport-boxshadow * { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
} | |
/* ...and bring back focus */ | |
.ui-mobile-nosupport-boxshadow .ui-focus { | |
outline-width: 2px; | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
/* some unsets - more probably needed */ | |
.ui-mobile, .ui-mobile body { height: 100%; } | |
.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; } | |
.ui-mobile a img, .ui-mobile fieldset { border: 0; } | |
/* responsive page widths */ | |
.ui-mobile-viewport { margin: 0; overflow-x: hidden; -webkit-text-size-adjust: none; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } | |
/* "page" containers - full-screen views, one should always be in view post-pageload */ | |
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; } | |
.ui-mobile .ui-page-active { display: block; overflow: visible; } | |
/*orientations from js are available */ | |
.portrait, | |
.portrait .ui-page { min-height: 420px; } | |
.landscape, | |
.landscape .ui-page { min-height: 300px; } | |
/* loading screen */ | |
.ui-loading .ui-mobile-viewport { overflow: hidden !important; } | |
.ui-loading .ui-loader { display: block; } | |
.ui-loading .ui-page { overflow: hidden; } | |
.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; } | |
.ui-loader h1 { font-size: 15px; text-align: center; } | |
.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; } | |
/*fouc*/ | |
.ui-mobile-rendering > * { visibility: hidden; } | |
/*headers, content panels*/ | |
.ui-bar, .ui-body { position: relative; padding: .4em 15px; overflow: hidden; display: block; clear:both; } | |
.ui-bar { font-size: 16px; margin: 0; } | |
.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; } | |
.ui-header, .ui-footer { display: block; } | |
.ui-page .ui-header, .ui-page .ui-footer { position: relative; } | |
.ui-header .ui-btn-left { position: absolute; left: 10px; top: .4em; } | |
.ui-header .ui-btn-right { position: absolute; right: 10px; top: .4em; } | |
.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 90px .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; } | |
/*content area*/ | |
.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; } | |
.ui-page-fullscreen .ui-content { padding:0; } | |
/* icons sizing */ | |
.ui-icon { width: 18px; height: 18px; } | |
/* fullscreen class on ui-content div */ | |
.ui-fullscreen { } | |
.ui-fullscreen img { max-width: 100%; } | |
/* non-js content hiding */ | |
.ui-nojs { position: absolute; left: -9999px; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.spin { | |
-webkit-transform: rotate(360deg); | |
-webkit-animation-name: spin; | |
-webkit-animation-duration: 1s; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-timing-function: linear; | |
} | |
@-webkit-keyframes spin { | |
from {-webkit-transform: rotate(0deg);} | |
to {-webkit-transform: rotate(360deg);} | |
} | |
/* Transitions from jQtouch (with small modifications): http://www.jqtouch.com/ | |
Built by David Kaneda and maintained by Jonathan Stark. | |
*/ | |
.in, .out { | |
-webkit-animation-timing-function: ease-in-out; | |
-webkit-animation-duration: 350ms; | |
} | |
.slide.in { | |
-webkit-transform: translateX(0); | |
-webkit-animation-name: slideinfromright; | |
} | |
.slide.out { | |
-webkit-transform: translateX(-100%); | |
-webkit-animation-name: slideouttoleft; | |
} | |
.slide.in.reverse { | |
-webkit-transform: translateX(0); | |
-webkit-animation-name: slideinfromleft; | |
} | |
.slide.out.reverse { | |
-webkit-transform: translateX(100%); | |
-webkit-animation-name: slideouttoright; | |
} | |
.slideup.in { | |
-webkit-transform: translateY(0); | |
-webkit-animation-name: slideinfrombottom; | |
z-index: 10; | |
} | |
.slideup.out { | |
-webkit-animation-name: dontmove; | |
z-index: 0; | |
} | |
.slideup.out.reverse { | |
-webkit-transform: translateY(100%); | |
z-index: 10; | |
-webkit-animation-name: slideouttobottom; | |
} | |
.slideup.in.reverse { | |
z-index: 0; | |
-webkit-animation-name: dontmove; | |
} | |
.slidedown.in { | |
-webkit-transform: translateY(0); | |
-webkit-animation-name: slideinfromtop; | |
z-index: 10; | |
} | |
.slidedown.out { | |
-webkit-animation-name: dontmove; | |
z-index: 0; | |
} | |
.slidedown.out.reverse { | |
-webkit-transform: translateY(-100%); | |
z-index: 10; | |
-webkit-animation-name: slideouttotop; | |
} | |
.slidedown.in.reverse { | |
z-index: 0; | |
-webkit-animation-name: dontmove; | |
} | |
@-webkit-keyframes slideinfromright { | |
from { -webkit-transform: translateX(100%); } | |
to { -webkit-transform: translateX(0); } | |
} | |
@-webkit-keyframes slideinfromleft { | |
from { -webkit-transform: translateX(-100%); } | |
to { -webkit-transform: translateX(0); } | |
} | |
@-webkit-keyframes slideouttoleft { | |
from { -webkit-transform: translateX(0); } | |
to { -webkit-transform: translateX(-100%); } | |
} | |
@-webkit-keyframes slideouttoright { | |
from { -webkit-transform: translateX(0); } | |
to { -webkit-transform: translateX(100%); } | |
} | |
@-webkit-keyframes slideinfromtop { | |
from { -webkit-transform: translateY(-100%); } | |
to { -webkit-transform: translateY(0); } | |
} | |
@-webkit-keyframes slideinfrombottom { | |
from { -webkit-transform: translateY(100%); } | |
to { -webkit-transform: translateY(0); } | |
} | |
@-webkit-keyframes slideouttobottom { | |
from { -webkit-transform: translateY(0); } | |
to { -webkit-transform: translateY(100%); } | |
} | |
@-webkit-keyframes slideouttotop { | |
from { -webkit-transform: translateY(0); } | |
to { -webkit-transform: translateY(-100%); } | |
} | |
@-webkit-keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@-webkit-keyframes fadeout { | |
from { opacity: 1; } | |
to { opacity: 0; } | |
} | |
.fade.in { | |
opacity: 1; | |
z-index: 10; | |
-webkit-animation-name: fadein; | |
} | |
.fade.out { | |
z-index: 0; | |
-webkit-animation-name: fadeout; | |
} | |
/* The properties in this rule are only necessary for the 'flip' transition. | |
* We need specify the perspective to create a projection matrix. This will add | |
* some depth as the element flips. The depth number represents the distance of | |
* the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate | |
* value. | |
*/ | |
.viewport-flip { | |
-webkit-perspective: 1000; | |
position: absolute; | |
} | |
.ui-mobile-viewport-transitioning, | |
.ui-mobile-viewport-transitioning .ui-page { | |
width: 100%; | |
height: 100%; | |
overflow: hidden; | |
} | |
.flip { | |
-webkit-animation-duration: .65s; | |
-webkit-backface-visibility:hidden; | |
-webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ | |
} | |
.flip.in { | |
-webkit-transform: rotateY(0) scale(1); | |
-webkit-animation-name: flipinfromleft; | |
} | |
.flip.out { | |
-webkit-transform: rotateY(-180deg) scale(.8); | |
-webkit-animation-name: flipouttoleft; | |
} | |
/* Shake it all about */ | |
.flip.in.reverse { | |
-webkit-transform: rotateY(0) scale(1); | |
-webkit-animation-name: flipinfromright; | |
} | |
.flip.out.reverse { | |
-webkit-transform: rotateY(180deg) scale(.8); | |
-webkit-animation-name: flipouttoright; | |
} | |
@-webkit-keyframes flipinfromright { | |
from { -webkit-transform: rotateY(-180deg) scale(.8); } | |
to { -webkit-transform: rotateY(0) scale(1); } | |
} | |
@-webkit-keyframes flipinfromleft { | |
from { -webkit-transform: rotateY(180deg) scale(.8); } | |
to { -webkit-transform: rotateY(0) scale(1); } | |
} | |
@-webkit-keyframes flipouttoleft { | |
from { -webkit-transform: rotateY(0) scale(1); } | |
to { -webkit-transform: rotateY(-180deg) scale(.8); } | |
} | |
@-webkit-keyframes flipouttoright { | |
from { -webkit-transform: rotateY(0) scale(1); } | |
to { -webkit-transform: rotateY(180deg) scale(.8); } | |
} | |
/* Hackish, but reliable. */ | |
@-webkit-keyframes dontmove { | |
from { opacity: 1; } | |
to { opacity: 1; } | |
} | |
.pop { | |
-webkit-transform-origin: 50% 50%; | |
} | |
.pop.in { | |
-webkit-transform: scale(1); | |
opacity: 1; | |
-webkit-animation-name: popin; | |
z-index: 10; | |
} | |
.pop.out.reverse { | |
-webkit-transform: scale(.2); | |
opacity: 0; | |
-webkit-animation-name: popout; | |
z-index: 10; | |
} | |
.pop.in.reverse { | |
z-index: 0; | |
-webkit-animation-name: dontmove; | |
} | |
@-webkit-keyframes popin { | |
from { | |
-webkit-transform: scale(.2); | |
opacity: 0; | |
} | |
to { | |
-webkit-transform: scale(1); | |
opacity: 1; | |
} | |
} | |
@-webkit-keyframes popout { | |
from { | |
-webkit-transform: scale(1); | |
opacity: 1; | |
} | |
to { | |
-webkit-transform: scale(.2); | |
opacity: 0; | |
} | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
/* content configurations. */ | |
.ui-grid-a, .ui-grid-b, .ui-grid-c, .ui-grid-d { overflow: hidden; } | |
.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d, .ui-block-e { margin: 0; padding: 0; border: 0; float: left; min-height:1px;} | |
/* grid solo: 100 - single item fallback */ | |
.ui-grid-solo .ui-block-a { width: 100%; float: none; } | |
/* grid a: 50/50 */ | |
.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 50%; } | |
.ui-grid-a .ui-block-a { clear: left; } | |
/* grid b: 33/33/33 */ | |
.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.333%; } | |
.ui-grid-b .ui-block-a { clear: left; } | |
/* grid c: 25/25/25/25 */ | |
.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 25%; } | |
.ui-grid-c .ui-block-a { clear: left; } | |
/* grid d: 20/20/20/20/20 */ | |
.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 20%; } | |
.ui-grid-d .ui-block-a { clear: left; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
/* fixed page header & footer configuration */ | |
.ui-header, .ui-footer, .ui-page-fullscreen .ui-header, .ui-page-fullscreen .ui-footer { position: absolute; overflow: hidden; width: 100%; border-left-width: 0; border-right-width: 0; } | |
.ui-header-fixed, .ui-footer-fixed { | |
z-index: 1000; | |
-webkit-transform: translateZ(0); /* Force header/footer rendering to go through the same rendering pipeline as native page scrolling. */ | |
} | |
.ui-footer-duplicate, .ui-page-fullscreen .ui-fixed-inline { display: none; } | |
.ui-page-fullscreen .ui-header, .ui-page-fullscreen .ui-footer { opacity: .9; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-navbar { overflow: hidden; } | |
.ui-navbar ul, .ui-navbar-expanded ul { list-style:none; padding: 0; margin: 0; position: relative; display: block; border: 0;} | |
.ui-navbar-collapsed ul { float: left; width: 75%; margin-right: -2px; } | |
.ui-navbar-collapsed .ui-navbar-toggle { float: left; width: 25%; } | |
.ui-navbar li.ui-navbar-truncate { position: absolute; left: -9999px; top: -9999px; } | |
.ui-navbar li .ui-btn, .ui-navbar .ui-navbar-toggle .ui-btn { display: block; font-size: 12px; text-align: center; margin: 0; border-right-width: 0; } | |
.ui-navbar li .ui-btn { margin-right: -1px; } | |
.ui-navbar li .ui-btn:last-child { margin-right: 0; } | |
.ui-header .ui-navbar li .ui-btn, .ui-header .ui-navbar .ui-navbar-toggle .ui-btn, | |
.ui-footer .ui-navbar li .ui-btn, .ui-footer .ui-navbar .ui-navbar-toggle .ui-btn { border-top-width: 0; border-bottom-width: 0; } | |
.ui-navbar .ui-btn-inner { padding-left: 2px; padding-right: 2px; } | |
.ui-navbar-noicons li .ui-btn .ui-btn-inner, .ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner { padding-top: .8em; padding-bottom: .9em; } | |
/*expanded page styles*/ | |
.ui-navbar-expanded .ui-btn { margin: 0; font-size: 14px; } | |
.ui-navbar-expanded .ui-btn-inner { padding-left: 5px; padding-right: 5px; } | |
.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner { padding: 45px 5px 15px; text-align: center; } | |
.ui-navbar-expanded .ui-btn-icon-top .ui-icon { top: 15px; } | |
.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner { padding: 15px 5px 45px; text-align: center; } | |
.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon { bottom: 15px; } | |
.ui-navbar-expanded li .ui-btn .ui-btn-inner { min-height: 2.5em; } | |
.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner { padding-top: 1.8em; padding-bottom: 1.9em; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-btn { display: block; text-align: center; cursor:pointer; position: relative; margin: .5em 5px; padding: 0; } | |
.ui-btn:focus, .ui-btn:active { outline: none; } | |
.ui-header .ui-btn, .ui-footer .ui-btn, .ui-bar .ui-btn { display: inline-block; font-size: 13px; margin: 0; } | |
.ui-btn-inline { display: inline-block; } | |
.ui-btn-inner { padding: .6em 25px; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: relative; zoom: 1; } | |
.ui-header .ui-btn-inner, .ui-footer .ui-btn-inner, .ui-bar .ui-btn-inner { padding: .4em 8px .5em; } | |
.ui-btn-icon-notext { display: inline-block; width: 20px; height: 20px; padding: 2px 1px 2px 3px; text-indent: -9999px; } | |
.ui-btn-icon-notext .ui-btn-inner { padding: 0; } | |
.ui-btn-icon-notext .ui-btn-text { position: absolute; left: -999px; } | |
.ui-btn-icon-left .ui-btn-inner { padding-left: 33px; } | |
.ui-header .ui-btn-icon-left .ui-btn-inner, | |
.ui-footer .ui-btn-icon-left .ui-btn-inner, | |
.ui-bar .ui-btn-icon-left .ui-btn-inner { padding-left: 27px; } | |
.ui-btn-icon-right .ui-btn-inner { padding-right: 33px; } | |
.ui-header .ui-btn-icon-right .ui-btn-inner, | |
.ui-footer .ui-btn-icon-right .ui-btn-inner, | |
.ui-bar .ui-btn-icon-right .ui-btn-inner { padding-right: 27px; } | |
.ui-btn-icon-top .ui-btn-inner { padding-top: 33px; } | |
.ui-header .ui-btn-icon-top .ui-btn-inner, | |
.ui-footer .ui-btn-icon-top .ui-btn-inner, | |
.ui-bar .ui-btn-icon-top .ui-btn-inner { padding-top: 27px; } | |
.ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 33px; } | |
.ui-header .ui-btn-icon-bottom .ui-btn-inner, | |
.ui-footer .ui-btn-icon-bottom .ui-btn-inner, | |
.ui-bar .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 27px; } | |
/*btn icon positioning*/ | |
.ui-btn-icon-notext .ui-icon { display: block; } | |
.ui-btn-icon-left .ui-icon, .ui-btn-icon-right .ui-icon { position: absolute; top: 50%; margin-top: -9px; } | |
.ui-btn-icon-top .ui-icon, .ui-btn-icon-bottom .ui-icon { position: absolute; left: 50%; margin-left: -9px; } | |
.ui-btn-icon-left .ui-icon { left: 10px; } | |
.ui-btn-icon-right .ui-icon {right: 10px; } | |
.ui-header .ui-btn-icon-left .ui-icon, | |
.ui-footer .ui-btn-icon-left .ui-icon, | |
.ui-bar .ui-btn-icon-left .ui-icon { left: 4px; } | |
.ui-header .ui-btn-icon-right .ui-icon, | |
.ui-footer .ui-btn-icon-right .ui-icon, | |
.ui-bar .ui-btn-icon-right .ui-icon { right: 4px; } | |
.ui-header .ui-btn-icon-top .ui-icon, | |
.ui-footer .ui-btn-icon-top .ui-icon, | |
.ui-bar .ui-btn-icon-top .ui-icon { top: 4px; } | |
.ui-header .ui-btn-icon-bottom .ui-icon, | |
.ui-footer .ui-btn-icon-bottom .ui-icon, | |
.ui-bar .ui-btn-icon-bottom .ui-icon { bottom: 4px; } | |
.ui-btn-icon-top .ui-icon { top: 5px; } | |
.ui-btn-icon-bottom .ui-icon { bottom: 5px; } | |
/*hiding native button,inputs */ | |
.ui-btn-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-appearance: button; opacity: 0; cursor: pointer; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); background: transparent; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-collapsible-contain { margin: .5em 0; } | |
.ui-collapsible-heading { font-size: 16px; display: block; margin: 0 -8px; padding: 0; border-width: 0 0 1px 0; position: relative; } | |
.ui-collapsible-heading a { text-align: left; margin: 0; } | |
.ui-collapsible-heading a .ui-btn-inner { padding-left: 40px; } | |
.ui-collapsible-heading a span.ui-btn { position: absolute; left: 6px; top: 50%; margin: -12px 0 0 0; width: 20px; height: 20px; padding: 1px 0px 1px 2px; text-indent: -9999px; } | |
.ui-collapsible-heading a span.ui-btn .ui-btn-inner { padding: 10px 0; } | |
.ui-collapsible-heading a span.ui-btn .ui-icon { left: 0; margin-top: -10px; } | |
.ui-collapsible-heading-status { position:absolute; left:-9999px; } | |
.ui-collapsible-content { display: block; padding: 10px 0 10px 8px; } | |
.ui-collapsible-content-collapsed { display: none; } | |
.ui-collapsible-set { margin: .5em 0; } | |
.ui-collapsible-set .ui-collapsible-contain { margin: -1px 0 0; } | |
/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-controlgroup, fieldset.ui-controlgroup { padding: 0; margin: .5em 0 1em; } | |
.ui-bar .ui-controlgroup { margin: 0 .3em; } | |
.ui-controlgroup-label { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; } | |
.ui-controlgroup-controls { display: block; width: 95%;} | |
.ui-controlgroup li { list-style: none; } | |
.ui-controlgroup-vertical .ui-btn, | |
.ui-controlgroup-vertical .ui-checkbox, .ui-controlgroup-vertical .ui-radio { margin: 0; border-bottom-width: 0; } | |
.ui-controlgroup-vertical .ui-controlgroup-last { border-bottom-width: 1px; } | |
.ui-controlgroup-horizontal { padding: 0; } | |
.ui-controlgroup-horizontal .ui-btn, | |
.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio { display: inline-block; margin: 0 -5px 0 0; } | |
.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio { display: inline; } | |
.ui-controlgroup-horizontal .ui-checkbox .ui-btn, .ui-controlgroup-horizontal .ui-radio .ui-btn, | |
.ui-controlgroup-horizontal .ui-checkbox:last-child, .ui-controlgroup-horizontal .ui-radio:last-child { margin-right: 0; } | |
.ui-controlgroup-horizontal .ui-controlgroup-last { margin-right: 0; } | |
.ui-controlgroup .ui-checkbox label, .ui-controlgroup .ui-radio label { font-size: 16px; } | |
/* conflicts with listview.. | |
.ui-controlgroup .ui-btn-icon-notext { width: 30px; height: 30px; text-indent: -9999px; } | |
.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner { padding: 5px 6px 5px 5px; } | |
*/ | |
@media all and (min-width: 450px){ | |
.ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
.ui-controlgroup-controls { width: 60%; display: inline-block; } | |
} /* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-dialog { min-height: 480px; } | |
.ui-dialog .ui-header, .ui-dialog .ui-content, .ui-dialog .ui-footer { margin: 15px; position: relative; } | |
.ui-dialog .ui-header, .ui-dialog .ui-footer { z-index: 10; width: auto; } | |
.ui-dialog .ui-content, .ui-dialog .ui-footer { margin-top: -15px; }/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-checkbox, .ui-radio { position:relative; margin: .2em 0 .5em; z-index: 1; } | |
.ui-checkbox .ui-btn, .ui-radio .ui-btn { margin: 0; text-align: left; z-index: 2; } | |
.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner { white-space: normal; } | |
.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner { padding-left: 45px; } | |
.ui-checkbox .ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } | |
.ui-checkbox .ui-icon, .ui-radio .ui-icon { top: 1.1em; } | |
.ui-checkbox .ui-btn-icon-left .ui-icon, .ui-radio .ui-btn-icon-left .ui-icon {left: 15px; } | |
.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon {right: 15px; } | |
/* input, label positioning */ | |
.ui-checkbox input,.ui-radio input { position:absolute; left:20px; top:50%; width: 10px; height: 10px; margin:-5px 0 0 0; outline: 0 !important; z-index: 1; }/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-field-contain { padding: 1.5em 0; margin: 0; border-bottom-width: 1px; overflow: visible; } | |
.ui-field-contain:first-child { border-top-width: 0; } | |
@media all and (min-width: 450px){ | |
.ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; } | |
} /* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-select { display: block; position: relative; } | |
.ui-select select { position: absolute; left: -9999px; top: -9999px; } | |
.ui-select .ui-btn { overflow: hidden; } | |
.ui-select .ui-btn select { cursor: pointer; -webkit-appearance: button; left: 0; top:0; width: 100%; height: 100%; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } | |
@-moz-document url-prefix() {.ui-select .ui-btn select { opacity: 0.0001; }} | |
.ui-select .ui-btn select.ui-select-nativeonly { opacity: 1; text-indent: 0; } | |
.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } | |
.ui-select .ui-btn-icon-right .ui-icon { right: 15px; } | |
/* labels */ | |
label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; } | |
/*listbox*/ | |
.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; } | |
.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden;} | |
.ui-selectmenu { position: absolute; padding: 0; z-index: 100 !important; width: 80%; max-width: 350px; padding: 6px; } | |
.ui-selectmenu .ui-listview { margin: 0; } | |
.ui-selectmenu .ui-btn.ui-li-divider { cursor: default; } | |
.ui-selectmenu-hidden { top: -9999px; left: -9999px; } | |
.ui-selectmenu-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 99; } | |
.ui-screen-hidden, .ui-selectmenu-list .ui-li .ui-icon { display: none; } | |
.ui-selectmenu-list .ui-li .ui-icon { display: block; } | |
.ui-li.ui-selectmenu-placeholder { display: none; } | |
.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; } | |
@media all and (min-width: 450px){ | |
label.ui-select { display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
.ui-select { width: 60%; display: inline-block; } | |
} | |
/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button. this shim's content in there */ | |
.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; }/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
label.ui-input-text { font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; } | |
input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; line-height: 1.4; font-size: 16px; display: block; width: 95%; } | |
input.ui-input-text { -webkit-appearance: none; } | |
textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear; -moz-transition: height 200ms linear; -o-transition: height 200ms linear; transition: height 200ms linear; } | |
.ui-input-search { padding: 0 30px; width: 77%; background-position: 8px 50%; background-repeat: no-repeat; position: relative; } | |
.ui-input-search input.ui-input-text { border: none; width: 98%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; } | |
.ui-input-search .ui-input-clear { position: absolute; right: 0; top: 50%; margin-top: -14px; } | |
.ui-input-search .ui-input-clear-hidden { display: none; } | |
/* orientation adjustments - incomplete!*/ | |
@media all and (min-width: 450px){ | |
label.ui-input-text { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0 } | |
input.ui-input-text, | |
textarea.ui-input-text, | |
.ui-input-search { width: 60%; display: inline-block; } | |
.ui-input-search { width: 50%; } | |
.ui-input-search input.ui-input-text { width: 98%; /*echos rule from above*/ } | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
.ui-listview { margin: 0; counter-reset: listnumbering; } | |
.ui-content .ui-listview { margin: -15px; } | |
.ui-content .ui-listview-inset { margin: 1em 0; } | |
.ui-listview, .ui-li { list-style:none; padding:0; } | |
.ui-li, .ui-li.ui-field-contain { display: block; margin:0; position: relative; overflow: visible; text-align: left; border-width: 0; border-top-width: 1px; } | |
.ui-li .ui-btn-text a.ui-link-inherit { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } | |
.ui-li-divider, .ui-li-static { padding: .5em 15px; font-size: 14px; font-weight: bold; } | |
.ui-li-divider { counter-reset: listnumbering; } | |
ol.ui-listview .ui-link-inherit:before, ol.ui-listview .ui-li-static:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal;counter-increment: listnumbering; content: counter(listnumbering) ". "; } | |
ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid chance of duplication */ | |
.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; } | |
.ui-li:last-child, .ui-li.ui-field-contain:last-child { border-bottom-width: 1px; } | |
.ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; } | |
.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 75px .7em 15px; display: block; } | |
.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb { min-height: 60px; padding-left: 100px; } | |
.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon { min-height: 20px; padding-left: 40px; } | |
.ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } | |
.ui-li-desc { font-size: 12px; font-weight: normal; display: block; margin: -.5em 0 .6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } | |
.ui-li-thumb, .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; } | |
.ui-li-icon { max-height: 40px; max-width: 40px; left: 10px; top: .9em; } | |
.ui-li-thumb, .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; } | |
.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; } | |
@media all and (min-width: 480px){ | |
.ui-li-aside { width: 45%; } | |
} | |
.ui-li-divider { cursor: default; } | |
.ui-li-has-alt .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt { padding-right: 95px; } | |
.ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 38px; } | |
.ui-li-divider .ui-li-count, .ui-li-static .ui-li-count { right: 10px; } | |
.ui-li-has-alt .ui-li-count { right: 55px; } | |
.ui-li-link-alt { position: absolute; width: 40px; height: 100%; border-width: 0; border-left-width: 1px; top: 0; right: 0; margin: 0; padding: 0; } | |
.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 8px; top: 50%; margin: -11px 0 0 0; border-bottom-width: 1px; } | |
.ui-li-link-alt .ui-btn-inner { padding: 0; position: static; } | |
.ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px; } | |
.ui-listview-filter { border-width: 0; overflow: hidden; margin: -15px -15px 15px -15px } | |
.ui-listview-filter .ui-input-search { margin: 5px; width: auto; display: block; } | |
.ui-listview-filter-inset { margin: -15px -5px -15px -5px; background: transparent; } | |
.ui-li.ui-screen-hidden{display:none;} | |
/* Odd iPad positioning issue. */ | |
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { | |
.ui-li .ui-btn-text { overflow: visible; } | |
}/* | |
* jQuery Mobile Framework | |
* Copyright (c) jQuery Project | |
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. | |
*/ | |
label.ui-slider { display: block; } | |
input.ui-slider-input { display: inline-block; width: 50px; } | |
select.ui-slider-switch { display: none; } | |
div.ui-slider { position: relative; display: inline-block; overflow: visible; height: 15px; padding: 0; margin: 0 2% 0 20px; top: 4px; width: 66%; } | |
a.ui-slider-handle { position: absolute; z-index: 10; top: 50%; width: 28px; height: 28px; margin-top: -15px; margin-left: -15px; } | |
a.ui-slider-handle .ui-btn-inner { padding-left: 0; padding-right: 0; } | |
@media all and (min-width: 480px){ | |
label.ui-slider { display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
div.ui-slider { width: 45%; } | |
} | |
div.ui-slider-switch { height: 32px; overflow: hidden; margin-left: 0; } | |
div.ui-slider-inneroffset { margin-left: 50%; position: absolute; top: 1px; height: 100%; width: 50%; } | |
div.ui-slider-handle-snapping { -webkit-transition: left 100ms linear; } | |
div.ui-slider-labelbg { position: absolute; top:0; margin: 0; border-width: 0; } | |
div.ui-slider-switch div.ui-slider-labelbg-a { width: 60%; height: 100%; left: 0; } | |
div.ui-slider-switch div.ui-slider-labelbg-b { width: 60%; height: 100%; right: 0; } | |
.ui-slider-switch-a div.ui-slider-labelbg-a, .ui-slider-switch-b div.ui-slider-labelbg-b { z-index: -1; } | |
.ui-slider-switch-a div.ui-slider-labelbg-b, .ui-slider-switch-b div.ui-slider-labelbg-a { z-index: 0; } | |
div.ui-slider-switch a.ui-slider-handle { z-index: 20; width: 101%; height: 32px; margin-top: -18px; margin-left: -101%; } | |
span.ui-slider-label { width: 100%; position: absolute;height: 32px; font-size: 16px; text-align: center; line-height: 2; background: none; border-color: transparent; } | |
span.ui-slider-label-a { left: -100%; margin-right: -1px } | |
span.ui-slider-label-b { right: -100%; margin-left: -1px } | |
<?php | |
header('Content-type: text/css'); | |
ob_start("compress"); | |
function compress($buffer) { | |
/* remove comments */ | |
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); | |
/* remove tabs, spaces, newlines, etc. */ | |
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); | |
return $buffer; | |
} | |
echo ' | |
.ui-li-thumb, .ui-li-icon { position: relative; } | |
.ui-navbar { | |
width: 100%; | |
} | |
.ui-btn-inner { | |
white-space: normal !important; | |
} | |
.ui-li-heading { | |
white-space: normal !important; | |
} | |
.ui-listview-filter { | |
margin: 0 !important; | |
} | |
.ui-icon-navigation { | |
background-image: url(images/113-navigation.png); | |
background-position: 1px 0; | |
} | |
.ui-icon-beaker { | |
background-image: url(images/91-beaker-2.png); | |
background-position: 1px 0; | |
} | |
#footer { | |
text-size: 0.75em; | |
text-align: center; | |
} | |
body { | |
background-color: #F0F0F0; | |
} | |
#jqm-homeheader { | |
text-align: center; | |
} | |
.viaPoints { | |
display: none; | |
text-size: 0.2em; | |
} | |
.min-width-480px .viaPoints { | |
display: inline; | |
} | |
#extrainfo { | |
visibility: hidden; | |
display: none; | |
} | |
#servicewarning { | |
padding: 1em; | |
margin-bottom: 0.5em; | |
text-size: 0.2em; | |
background-color: #FF9; | |
-moz-border-radius: 15px; | |
border-radius: 15px; | |
} | |
#footer { | |
clear:both; | |
text-align:center; | |
} | |
// source http://webaim.org/techniques/skipnav/ | |
#skip a, #skip a:hover, #skip a:visited | |
{ | |
position:absolute; | |
left:0px; | |
top:-500px; | |
width:1px; | |
height:1px; | |
overflow:hidden; | |
} | |
#skip a:active, #skip a:focus | |
{ | |
position:static; | |
width:auto; | |
height:auto; | |
}'; | |
//if (false) | |
echo ' | |
// adaptive layout from jQuery Mobile docs site | |
.type-interior .content-secondary { | |
border-right: 0; | |
border-left: 0; | |
margin: 10px -15px 0; | |
background: #fff; | |
border-top: 1px solid #ccc; | |
} | |
.type-home .ui-content { | |
margin-top: 5px; | |
} | |
.type-interior .ui-content { | |
padding-bottom: 0; | |
} | |
.content-secondary .ui-collapsible-contain { | |
padding: 10px 15px; | |
} | |
.content-secondary .ui-collapsible-heading { | |
margin: 0 0 30px; | |
} | |
.content-secondary .ui-collapsible-heading-collapsed, | |
.content-secondary .ui-collapsible-content { | |
padding:0; | |
margin: 0; | |
} | |
@media all and (min-width: 650px){ | |
.content-secondary { | |
text-align: left; | |
float: left; | |
width: 45%; | |
background: none; | |
border-top: 0; | |
} | |
.content-secondary, | |
.type-interior .content-secondary { | |
margin: 30px 0 20px 2%; | |
padding: 20px 4% 0 0; | |
background: none; | |
} | |
.type-index .content-secondary { | |
padding: 0; | |
} | |
.type-index .content-secondary .ui-listview { | |
margin: 0; | |
} | |
.content-primary { | |
width: 45%; | |
float: right; | |
margin-top: 30px; | |
margin-right: 1%; | |
padding-right: 1%; | |
} | |
.content-primary ul:first-child { | |
margin-top: 0; | |
} | |
.type-interior .content-primary { | |
padding: 1.5em 6% 3em 0; | |
margin: 0; | |
} | |
/* fix up the collapsibles - expanded on desktop */ | |
.content-secondary .ui-collapsible-heading { | |
display: none; | |
} | |
.content-secondary .ui-collapsible-contain { | |
margin:0; | |
} | |
.content-secondary .ui-collapsible-content { | |
display: block; | |
margin: 0; | |
padding: 0; | |
} | |
.type-interior .content-secondary .ui-li-divider { | |
padding-top: 1em; | |
padding-bottom: 1em; | |
} | |
.type-interior .content-secondary { | |
margin: 0; | |
padding: 0; | |
} | |
} | |
@media all and (min-width: 750px){ | |
.type-home .ui-content, | |
.type-interior .ui-content { | |
background-position: 39%; | |
} | |
.content-secondary { | |
width: 34%; | |
} | |
.content-primary { | |
width: 56%; | |
padding-right: 1%; | |
} | |
.type-interior .ui-content { | |
background-position: 34%; | |
} | |
} | |
@media all and (min-width: 1200px){ | |
.type-home .ui-content{ | |
background-position: 38.5%; | |
} | |
.type-interior .ui-content { | |
background-position: 30%; | |
} | |
.content-secondary { | |
width: 30%; | |
padding-right:6%; | |
margin: 30px 0 20px 5%; | |
} | |
.type-interior .content-secondary { | |
margin: 0; | |
padding: 0; | |
} | |
.content-primary { | |
width: 50%; | |
margin-right: 5%; | |
padding-right: 3%; | |
} | |
.type-interior .content-primary { | |
width: 60%; | |
} | |
}'; | |
ob_end_flush(); | |
?> | |
#!/bin/bash | #!/bin/bash |
#dotcloud postinstall | #dotcloud postinstall |
curl http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \ | curl http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \ |
-o /home/dotcloud/current/cbrfeed.zip | -o /home/dotcloud/current/cbrfeed.zip |
wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \ | curl http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \ |
-O /tmp/Graph.obj | -o /tmp/Graph.obj |
#db setup | #db setup |
#curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz | #curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz |
#curl https://github.com/maxious/ACTBus-ui/raw/master/lib/postgis.sql -o postgis.sql | #curl https://github.com/maxious/ACTBus-ui/raw/master/lib/postgis.sql -o postgis.sql |
#createlang -d transitdata plpgsql | #createlang -d transitdata plpgsql |
#psql -d transitdata -f postgis.sql | #psql -d transitdata -f postgis.sql |
#gunzip /var/www/transitdata.cbrfeed.sql.gz | #gunzip /var/www/transitdata.cbrfeed.sql.gz |
#psql -d transitdata -f transitdata.cbrfeed.sql | #psql -d transitdata -f transitdata.cbrfeed.sql |
#createuser transitdata -SDRP | #createuser transitdata -SDRP |
#password transitdata | #password transitdata |
#psql -c \"GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;\" | #psql -c \"GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;\" |
<?php | |
function getScheme() | |
{ | |
$scheme = 'http'; | |
if (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on') { | |
$scheme .= 's'; | |
} | |
return $scheme; | |
} | |
function getTrustRoot() | |
{ | |
return sprintf("%s://%s:%s%s/", | |
getScheme(), $_SERVER['SERVER_NAME'], | |
$_SERVER['SERVER_PORT'], | |
dirname($_SERVER['PHP_SELF'])); | |
} | |
// Includes required files | |
set_include_path(get_include_path() . PATH_SEPARATOR . $labsPath."lib/openid-php/"); | |
require_once "Auth/OpenID/Consumer.php"; | |
require_once "Auth/OpenID/FileStore.php"; | |
require_once "Auth/OpenID/AX.php"; | |
function login() | |
{ | |
// Just tested this with/for Google, needs trying with others ... | |
$oid_identifier = 'https://www.google.com/accounts/o8/id'; | |
// Create file storage area for OpenID data | |
$store = new Auth_OpenID_FileStore('lib/openid-php/oid_store'); | |
// Create OpenID consumer | |
$consumer = new Auth_OpenID_Consumer($store); | |
// Create an authentication request to the OpenID provider | |
$auth = $consumer -> begin($oid_identifier); | |
// Create attribute request object | |
// See http://code.google.com/apis/accounts/docs/OpenID.html#Parameters for parameters | |
// Usage: make($type_uri, $count=1, $required=false, $alias=null) | |
$attribute[] = Auth_OpenID_AX_AttrInfo :: make('http://axschema.org/contact/email', 2, 1, 'email'); | |
$attribute[] = Auth_OpenID_AX_AttrInfo :: make('http://axschema.org/namePerson/first', 1, 1, 'firstname'); | |
$attribute[] = Auth_OpenID_AX_AttrInfo :: make('http://axschema.org/namePerson/last', 1, 1, 'lastname'); | |
// Create AX fetch request | |
$ax = new Auth_OpenID_AX_FetchRequest; | |
// Add attributes to AX fetch request | |
foreach($attribute as $attr) { | |
$ax -> add($attr); | |
} | |
// Add AX fetch request to authentication request | |
$auth -> addExtension($ax); | |
$_SESSION['returnURL'] = curPageURL(); | |
// Redirect to OpenID provider for authentication | |
$url = $auth -> redirectURL(getTrustRoot(), $_SESSION['returnURL']); | |
header('Location: ' . $url); | |
} | |
function auth() | |
{ | |
if ($_SESSION['authed'] == true) return true; | |
// Create file storage area for OpenID data | |
$store = new Auth_OpenID_FileStore('lib/openid-php/oid_store'); | |
// Create OpenID consumer | |
$consumer = new Auth_OpenID_Consumer($store); | |
// Create an authentication request to the OpenID provider | |
$response = $consumer -> complete($_SESSION['returnURL']); | |
if ($response -> status == Auth_OpenID_SUCCESS) { | |
// Get registration informations | |
$ax = new Auth_OpenID_AX_FetchResponse(); | |
$obj = $ax -> fromSuccessResponse($response); | |
$email = $obj -> data['http://axschema.org/contact/email'][0]; | |
var_dump($email); | |
if ($email != "maxious@gmail.com") { | |
die("Access Denied"); | |
} else { | |
$_SESSION['authed'] = true; | |
} | |
} else { | |
login(); | |
} | |
} | |
if ($_REQUEST['janrain_nonce']) auth(); | |
?> |
<?php | <?php |
// SELECT array_to_string(array(SELECT REPLACE(name_2006, ',', '\,') as name FROM suburbs order by name), ',') | // SELECT array_to_string(array(SELECT REPLACE(name_2006, ',', '\,') as name FROM suburbs order by name), ',') |
$suburbs = explode(",", "Acton,Ainslie,Amaroo,Aranda,Banks,Barton,Belconnen,Bonner,Bonython,Braddon,Bruce,Calwell,Campbell,Chapman,Charnwood,Chifley,Chisholm,City,Conder,Cook,Curtin,Deakin,Dickson,Downer,Duffy,Dunlop,Evatt,Fadden,Farrer,Fisher,Florey,Flynn,Forrest,Franklin,Fraser,Fyshwick,Garran,Gilmore,Giralang,Gordon,Gowrie,Greenway,Griffith,Gungahlin,Hackett,Hall,Harrison,Hawker,Higgins,Holder,Holt,Hughes,Hume,Isaacs,Isabella Plains,Kaleen,Kambah,Kingston,Latham,Lawson,Lyneham,Lyons,Macarthur,Macgregor,Macquarie,Mawson,McKellar,Melba,Mitchell,Monash,Narrabundah,Ngunnawal,Nicholls,Oaks Estate,O'Connor,O'Malley,Oxley,Page,Palmerston,Parkes,Pearce,Phillip,Pialligo,Red Hill,Reid,Richardson,Rivett,Russell,Scullin,Spence,Stirling,Symonston,Tharwa,Theodore,Torrens,Turner,Wanniassa,Waramanga,Watson,Weetangera,Weston,Yarralumla"); | $suburbs = explode(",", "Acton,Ainslie,Amaroo,Aranda,Banks,Barton,Belconnen,Bonner,Bonython,Braddon,Bruce,Calwell,Campbell,Chapman,Charnwood,Chifley,Chisholm,City,Conder,Cook,Curtin,Deakin,Dickson,Downer,Duffy,Dunlop,Evatt,Fadden,Farrer,Fisher,Florey,Flynn,Forrest,Franklin,Fraser,Fyshwick,Garran,Gilmore,Giralang,Gordon,Gowrie,Greenway,Griffith,Gungahlin,Hackett,Hall,Harrison,Hawker,Higgins,Holder,Holt,Hughes,Hume,Isaacs,Isabella Plains,Kaleen,Kambah,Kingston,Latham,Lawson,Lyneham,Lyons,Macarthur,Macgregor,Macquarie,Mawson,McKellar,Melba,Mitchell,Monash,Narrabundah,Ngunnawal,Nicholls,Oaks Estate,O'Connor,O'Malley,Oxley,Page,Palmerston,Parkes,Pearce,Phillip,Pialligo,Red Hill,Reid,Richardson,Rivett,Russell,Scullin,Spence,Stirling,Symonston,Tharwa,Theodore,Torrens,Turner,Wanniassa,Waramanga,Watson,Weetangera,Weston,Yarralumla"); |
function staticmap($mapPoints, $zoom = 0, $markerImage = "iconb", $collapsible = true) | function staticmap($mapPoints, $zoom = 0, $markerImage = "iconb", $collapsible = true, $twotone = false) |
{ | { |
global $labsPath; | global $labsPath; |
$width = 300; | $width = 300; |
$height = 300; | $height = 300; |
$metersperpixel[9] = 305.492 * $width; | $metersperpixel[9] = 305.492 * $width; |
$metersperpixel[10] = 152.746 * $width; | $metersperpixel[10] = 152.746 * $width; |
$metersperpixel[11] = 76.373 * $width; | $metersperpixel[11] = 76.373 * $width; |
$metersperpixel[12] = 38.187 * $width; | $metersperpixel[12] = 38.187 * $width; |
$metersperpixel[13] = 19.093 * $width; | $metersperpixel[13] = 19.093 * $width; |
$metersperpixel[14] = 9.547 * $width; | $metersperpixel[14] = 9.547 * $width; |
$metersperpixel[15] = 4.773 * $width; | $metersperpixel[15] = 4.773 * $width; |
$metersperpixel[16] = 2.387 * $width; | //$metersperpixel[16] = 2.387 * $width; |
// $metersperpixel[17]=1.193*$width; | // $metersperpixel[17]=1.193*$width; |
$center = ""; | $center = ""; |
$markers = ""; | $markers = ""; |
$minlat = 999; | $mapwidthinmeters = 50; |
$minlon = 999; | |
$maxlat = 0; | |
$maxlon = 0; | |
if (sizeof($mapPoints) < 1) return "map error"; | if (sizeof($mapPoints) < 1) return "map error"; |
if (sizeof($mapPoints) === 1) { | if (sizeof($mapPoints) === 1) { |
if ($zoom == 0) $zoom = 14; | if ($zoom == 0) $zoom = 14; |
$markers.= "{$mapPoints[0][0]},{$mapPoints[0][1]},$markerimage"; | $markers.= "{$mapPoints[0][0]},{$mapPoints[0][1]},$markerimage"; |
$center = "{$mapPoints[0][0]},{$mapPoints[0][1]}"; | $center = "{$mapPoints[0][0]},{$mapPoints[0][1]}"; |
} | } |
else { | else { |
foreach ($mapPoints as $index => $mapPoint) { | foreach ($mapPoints as $index => $mapPoint) { |
$markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . $markerImage . ($index + 1); | if ($twotone && $index == 0) { |
$markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . "iconr" . ($index + 1); | |
$center = "{$mapPoints[0][0]},{$mapPoints[0][1]}"; | |
} | |
else { | |
$markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . $markerImage . ($index + 1); | |
} | |
if ($index + 1 != sizeof($mapPoints)) $markers.= "|"; | if ($index + 1 != sizeof($mapPoints)) $markers.= "|"; |
if ($mapPoint[0] < $minlat) $minlat = $mapPoint[0]; | $dist = distance($mapPoints[0][0], $mapPoint[0][1], $mapPoint[0], $mapPoint[1]); |
if ($mapPoint[0] > $maxlat) $maxlat = $mapPoint[0]; | $mapwidthinmeters = ($dist > $mapwidthinmeters ? $dist : $mapwidthinmeters); |
if ($mapPoint[1] < $minlon) $minlon = $mapPoint[1]; | |
if ($mapPoint[1] > $maxlon) $maxlon = $mapPoint[1]; | |
$totalLat+= $mapPoint[0]; | $totalLat+= $mapPoint[0]; |
$totalLon+= $mapPoint[1]; | $totalLon+= $mapPoint[1]; |
} | } |
if ($zoom == 0) { | if ($zoom == 0) { |
$mapwidthinmeters = distance($minlat, $minlon, $minlat, $maxlon); | $mapwidthinmeters = distance($minlat, $minlon, $minlat, $maxlon); |
foreach (array_reverse($metersperpixel, true) as $zoomLevel => $maxdistance) { | foreach (array_reverse($metersperpixel, true) as $zoomLevel => $maxdistance) { |
if ($zoom == 0 && $mapwidthinmeters < ($maxdistance + 50)) $zoom = $zoomLevel; | if ($zoom == 0 && $mapwidthinmeters * 1.5 < ($maxdistance)) $zoom = $zoomLevel; |
} | } |
} | } |
$center = $totalLat / sizeof($mapPoints) . "," . $totalLon / sizeof($mapPoints); | $center = $totalLat / sizeof($mapPoints) . "," . $totalLon / sizeof($mapPoints); |
} | } |
$output = ""; | $output = ""; |
if ($collapsible) $output.= '<div class="map" data-role="collapsible" data-collapsed="true"><h3>Open Map...</h3>'; | if ($collapsible) $output.= '<div class="map" data-role="collapsible" data-collapsed="true"><h3>Open Map...</h3>'; |
$output.= '<img class="map" src="' . curPageURL() . '/'. $labsPath. '/lib/staticmaplite/staticmap.php?center=' . $center . '&zoom=' . $zoom . '&size=' . $width . 'x' . $height . '&markers=' . | $output.= '<img class="map" src="' . curPageURL() . '/' . $labsPath . '/lib/staticmaplite/staticmap.php?center=' . $center . '&zoom=' . $zoom . '&size=' . $width . 'x' . $height . '&markers=' . $markers . '" width=' . $width . ' height=' . $height . '>'; |
$markers . '" width=' . $width . ' height=' . $height . '>'; | |
if ($collapsible) $output.= '</div>'; | if ($collapsible) $output.= '</div>'; |
return $output; | return $output; |
} | } |
function distance($lat1, $lng1, $lat2, $lng2, $roundLargeValues = false) | function distance($lat1, $lng1, $lat2, $lng2, $roundLargeValues = false) |
{ | { |
$pi80 = M_PI / 180; | $pi80 = M_PI / 180; |
$lat1*= $pi80; | $lat1*= $pi80; |
$lng1*= $pi80; | $lng1*= $pi80; |
$lat2*= $pi80; | $lat2*= $pi80; |
$lng2*= $pi80; | $lng2*= $pi80; |
$r = 6372.797; // mean radius of Earth in km | $r = 6372.797; // mean radius of Earth in km |
$dlat = $lat2 - $lat1; | $dlat = $lat2 - $lat1; |
$dlng = $lng2 - $lng1; | $dlng = $lng2 - $lng1; |
$a = sin($dlat / 2) * sin($dlat / 2) + cos($lat1) * cos($lat2) * sin($dlng / 2) * sin($dlng / 2); | $a = sin($dlat / 2) * sin($dlat / 2) + cos($lat1) * cos($lat2) * sin($dlng / 2) * sin($dlng / 2); |
$c = 2 * atan2(sqrt($a) , sqrt(1 - $a)); | $c = 2 * atan2(sqrt($a) , sqrt(1 - $a)); |
$km = $r * $c; | $km = $r * $c; |
if ($roundLargeValues) { | if ($roundLargeValues) { |
if ($km < 1) return floor($km * 1000); | if ($km < 1) return floor($km * 1000); |
else return round($km,2)."k"; | else return round($km, 2) . "k"; |
} else return floor($km * 1000); | } |
else return floor($km * 1000); | |
} | } |
function decodePolylineToArray($encoded) | function decodePolylineToArray($encoded) |
{ | { |
// source: http://latlongeeks.com/forum/viewtopic.php?f=4&t=5 | // source: http://latlongeeks.com/forum/viewtopic.php?f=4&t=5 |
$length = strlen($encoded); | $length = strlen($encoded); |
$index = 0; | $index = 0; |
$points = array(); | $points = array(); |
$lat = 0; | $lat = 0; |
$lng = 0; | $lng = 0; |
while ($index < $length) { | while ($index < $length) { |
// Temporary variable to hold each ASCII byte. | // Temporary variable to hold each ASCII byte. |
$b = 0; | $b = 0; |
// The encoded polyline consists of a latitude value followed by a | // The encoded polyline consists of a latitude value followed by a |
// longitude value. They should always come in pairs. Read the | // longitude value. They should always come in pairs. Read the |
// latitude value first. | // latitude value first. |
$shift = 0; | $shift = 0; |
$result = 0; | $result = 0; |
do { | do { |
// The `ord(substr($encoded, $index++))` statement returns the ASCII | // The `ord(substr($encoded, $index++))` statement returns the ASCII |
// code for the character at $index. Subtract 63 to get the original | // code for the character at $index. Subtract 63 to get the original |
// value. (63 was added to ensure proper ASCII characters are displayed | // value. (63 was added to ensure proper ASCII characters are displayed |
// in the encoded polyline string, which is `human` readable) | // in the encoded polyline string, which is `human` readable) |
$b = ord(substr($encoded, $index++)) - 63; | $b = ord(substr($encoded, $index++)) - 63; |
// AND the bits of the byte with 0x1f to get the original 5-bit `chunk. | // AND the bits of the byte with 0x1f to get the original 5-bit `chunk. |
// Then left shift the bits by the required amount, which increases | // Then left shift the bits by the required amount, which increases |
// by 5 bits each time. | // by 5 bits each time. |
// OR the value into $results, which sums up the individual 5-bit chunks | // OR the value into $results, which sums up the individual 5-bit chunks |
// into the original value. Since the 5-bit chunks were reversed in | // into the original value. Since the 5-bit chunks were reversed in |
// order during encoding, reading them in this way ensures proper | // order during encoding, reading them in this way ensures proper |
// summation. | // summation. |
$result|= ($b & 0x1f) << $shift; | $result|= ($b & 0x1f) << $shift; |
$shift+= 5; | $shift+= 5; |
} | } |
// Continue while the read byte is >= 0x20 since the last `chunk` | // Continue while the read byte is >= 0x20 since the last `chunk` |
// was not OR'd with 0x20 during the conversion process. (Signals the end) | // was not OR'd with 0x20 during the conversion process. (Signals the end) |
while ($b >= 0x20); | while ($b >= 0x20); |
// Check if negative, and convert. (All negative values have the last bit | // Check if negative, and convert. (All negative values have the last bit |
// set) | // set) |
$dlat = (($result & 1) ? ~($result >> 1) : ($result >> 1)); | $dlat = (($result & 1) ? ~($result >> 1) : ($result >> 1)); |
// Compute actual latitude since value is offset from previous value. | // Compute actual latitude since value is offset from previous value. |
$lat+= $dlat; | $lat+= $dlat; |
// The next values will correspond to the longitude for this point. | // The next values will correspond to the longitude for this point. |
$shift = 0; | $shift = 0; |
$result = 0; | $result = 0; |
do { | do { |
$b = ord(substr($encoded, $index++)) - 63; | $b = ord(substr($encoded, $index++)) - 63; |
$result|= ($b & 0x1f) << $shift; | $result|= ($b & 0x1f) << $shift; |
$shift+= 5; | $shift+= 5; |
} while ($b >= 0x20); | } while ($b >= 0x20); |
$dlng = (($result & 1) ? ~($result >> 1) : ($result >> 1)); | $dlng = (($result & 1) ? ~($result >> 1) : ($result >> 1)); |
$lng+= $dlng; | $lng+= $dlng; |
// The actual latitude and longitude values were multiplied by | // The actual latitude and longitude values were multiplied by |
// 1e5 before encoding so that they could be converted to a 32-bit | // 1e5 before encoding so that they could be converted to a 32-bit |
// integer representation. (With a decimal accuracy of 5 places) | // integer representation. (With a decimal accuracy of 5 places) |
// Convert back to original values. | // Convert back to original values. |
$points[] = array( | $points[] = array( |
$lat * 1e-5, | $lat * 1e-5, |
$lng * 1e-5 | $lng * 1e-5 |
); | ); |
} | } |
return $points; | return $points; |
} | } |
function geocode($query, $giveOptions) | function geocode($query, $giveOptions) |
{ | { |
global $cloudmadeAPIkey; | global $cloudmadeAPIkey; |
$url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?query=" . urlencode($query) . "&bbox=-35.5,149.00,-35.15,149.1930&return_location=true&bbox_only=true"; | $url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?query=" . urlencode($query) . "&bbox=-35.5,149.00,-35.15,149.1930&return_location=true&bbox_only=true"; |
$contents = json_decode(getPage($url)); | $contents = json_decode(getPage($url)); |
if ($giveOptions) return $contents->features; | if ($giveOptions) return $contents->features; |
elseif (isset($contents->features[0]->centroid)) return $contents->features[0]->centroid->coordinates[0] . "," . $contents->features[0]->centroid->coordinates[1]; | elseif (isset($contents->features[0]->centroid)) return $contents->features[0]->centroid->coordinates[0] . "," . $contents->features[0]->centroid->coordinates[1]; |
else return ""; | else return ""; |
} | } |
function reverseGeocode($lat, $lng) | function reverseGeocode($lat, $lng) |
{ | { |
global $cloudmadeAPIkey; | global $cloudmadeAPIkey; |
$url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?around=" . $lat . "," . $lng . "&distance=closest&object_type=road"; | $url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?around=" . $lat . "," . $lng . "&distance=closest&object_type=road"; |
$contents = json_decode(getPage($url)); | $contents = json_decode(getPage($url)); |
return $contents->features[0]->properties->name; | return $contents->features[0]->properties->name; |
} | } |
?> | ?> |
<?php | <?php |
// Copyright 2009 Google Inc. All Rights Reserved. | // Copyright 2009 Google Inc. All Rights Reserved. |
$GA_ACCOUNT = "MO-22173039-1"; | $GA_ACCOUNT = "MO-22173039-1"; |
$GA_PIXEL = "/lib/ga.php"; | $GA_PIXEL = "/lib/ga.php"; |
function googleAnalyticsGetImageUrl() | function googleAnalyticsGetImageUrl() |
{ | { |
global $GA_ACCOUNT, $GA_PIXEL; | global $GA_ACCOUNT, $GA_PIXEL; |
//if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') return ""; | //if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') return ""; |
$url = ""; | $url = ""; |
$url.= $GA_PIXEL . "?"; | $url.= $GA_PIXEL . "?"; |
$url.= "utmac=" . $GA_ACCOUNT; | $url.= "utmac=" . $GA_ACCOUNT; |
$url.= "&utmn=" . rand(0, 0x7fffffff); | $url.= "&utmn=" . rand(0, 0x7fffffff); |
$referer = $_SERVER["HTTP_REFERER"]; | $referer = $_SERVER["HTTP_REFERER"]; |
$query = $_SERVER["QUERY_STRING"]; | $query = $_SERVER["QUERY_STRING"]; |
$path = $_SERVER["REQUEST_URI"]; | $path = $_SERVER["REQUEST_URI"]; |
if (empty($referer)) { | if (empty($referer)) { |
$referer = "-"; | $referer = "-"; |
} | } |
$url.= "&utmr=" . urlencode($referer); | $url.= "&utmr=" . urlencode($referer); |
if (!empty($path)) { | if (!empty($path)) { |
$url.= "&utmp=" . urlencode($path); | $url.= "&utmp=" . urlencode($path); |
} | } |
$url.= "&guid=ON"; | $url.= "&guid=ON"; |
return str_replace("&", "&", $url); | return str_replace("&", "&", $url); |
} | } |
function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) | function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) |
{ | { |
global $labsPath; | global $labsPath,$serviceAlertsEnabled; |
echo ' | echo ' |
<!DOCTYPE html> | <!DOCTYPE html> |
<html lang="en"> | <html lang="en"> |
<head> | <head> |
<meta charset="UTF-8"> | <meta charset="UTF-8"> |
<title>' . $pageTitle . '</title> | <meta name="viewport" content="width=device-width, initial-scale=1"> |
<meta name="google-site-verification" | <title>' . $pageTitle . '</title> |
content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" /> | <meta name="google-site-verification" content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" /> |
<link rel="stylesheet" href="'.$labsPath.'css/jquery-ui-1.8.12.custom.css" />'; | <link rel="dns-prefetch" href="//code.jquery.com"> |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> | |
<link rel="stylesheet" href="' . $labsPath . 'css/jquery-ui-1.8.12.custom.css" />'; | |
if (isDebugServer()) { | if (isDebugServer()) { |
echo '<link rel="stylesheet" href="'.$labsPath.'css/jquery.mobile-1.0b1.css" /> | $jqmcss = $labsPath . 'css/jquery.mobile-1.0b2.css'; |
$jqjs = $labsPath . 'js/jquery-1.6.2.min.js'; | |
<script type="text/javascript" src="'.$labsPath.'js/jquery-1.6.1.min.js"></script> | $jqmjs = $labsPath . 'js/jquery.mobile-1.0b2.js'; |
<script>$(document).bind("mobileinit", function(){ | } |
else { | |
$jqmcss = "//code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css"; | |
$jqjs = "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"; | |
$jqmjs = "//code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"; | |
} | |
echo '<link rel="stylesheet" href="' . $jqmcss . '" /> | |
<script src="'.$jqjs.'"></script> | |
<script>$(document).bind("mobileinit", function(){ | |
$.mobile.ajaxEnabled = false; | $.mobile.ajaxEnabled = false; |
}); | }); |
</script> | </script> |
<script type="text/javascript" src="'.$labsPath.'js/jquery.mobile-1.0b1.js"></script>'; | <script src="'.$jqmjs.'"></script> |
} | |
else { | <script src="' . $labsPath . 'js/jquery.ui.core.min.js"></script> |
echo '<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> | <script src="' . $labsPath . 'js/jquery.ui.position.min.js"></script> |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | <script src="' . $labsPath . 'js/jquery.ui.widget.min.js"></script> |
<script>$(document).bind("mobileinit", function(){ | <script src="' . $labsPath . 'js/jquery.ui.autocomplete.min.js"></script> |
$.mobile.ajaxEnabled = false; | |
}); | |
</script> | |
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>'; | |
} | |
echo ' | |
<script src="'.$labsPath.'js/jquery.ui.autocomplete.min.js"></script> | |
<script src="'.$labsPath.'js/jquery.ui.core.min.js"></script> | |
<script src="'.$labsPath.'js/jquery.ui.position.min.js"></script> | |
<script src="'.$labsPath.'js/jquery.ui.widget.min.js"></script> | |
<script> | <script> |
$(function() { | $(function() { |
$( "#geolocate" ).autocomplete({ | $( "#geolocate" ).autocomplete({ |
source: "lib/autocomplete.php", | source: "lib/autocomplete.php", |
minLength: 2 | minLength: 2 |
}); | }); |
$( "#from" ).autocomplete({ | $( "#from" ).autocomplete({ |
source: "lib/autocomplete.php", | source: "lib/autocomplete.php", |
minLength: 2 | minLength: 2 |
}); | }); |
$( "#to" ).autocomplete({ | $( "#to" ).autocomplete({ |
source: "lib/autocomplete.php", | source: "lib/autocomplete.php", |
minLength: 2 | minLength: 2 |
}); | }); |
}); | }); |
</script> | </script>'; |
'; | echo '<style type="text/css">'; |
echo '<style type="text/css"> | if (strstr($_SERVER['HTTP_USER_AGENT'], 'Android')) echo '.ui-shadow,.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a,.ui-body-b,.ui-btn-up-b,.ui-btn-hover-b, |
.ui-li-thumb, .ui-li-icon { position: relative; }'; | |
if (strstr($_SERVER['HTTP_USER_AGENT'], 'Android')) echo '.ui-shadow,.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a,.ui-body-b,.ui-btn-up-b,.ui-btn-hover-b, | |
.ui-btn-down-b,.ui-bar-c,.ui-body-c,.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c,.ui-bar-c,.ui-body-d, | .ui-btn-down-b,.ui-bar-c,.ui-body-c,.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c,.ui-bar-c,.ui-body-d, |
.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d,.ui-bar-d,.ui-body-e,.ui-btn-up-e,.ui-btn-hover-e, | .ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d,.ui-bar-d,.ui-body-e,.ui-btn-up-e,.ui-btn-hover-e, |
.ui-btn-down-e,.ui-bar-e,.ui-overlay-shadow,.ui-shadow,.ui-btn-active,.ui-body-a,.ui-bar-a { | .ui-btn-down-e,.ui-bar-e,.ui-overlay-shadow,.ui-shadow,.ui-btn-active,.ui-body-a,.ui-bar-a { |
text-shadow: none; | text-shadow: none; |
box-shadow: none; | box-shadow: none; |
-webkit-box-shadow: none; | -webkit-box-shadow: none; |
}'; | }'; |
echo ' | echo '</style>'; |
.ui-navbar { | echo '<link rel="stylesheet" href="' . $labsPath . 'css/local.css.php" />'; |
width: 100%; | |
} | |
.ui-btn-inner { | |
white-space: normal !important; | |
} | |
.ui-li-heading { | |
white-space: normal !important; | |
} | |
.ui-listview-filter { | |
margin: 0 !important; | |
} | |
.ui-icon-navigation { | |
background-image: url('.$labsPath.'css/images/113-navigation.png); | |
background-position: 1px 0; | |
} | |
.ui-icon-beaker { | |
background-image: url('.$labsPath.'css/images/91-beaker-2.png); | |
background-position: 1px 0; | |
} | |
#footer { | |
text-size: 0.75em; | |
text-align: center; | |
} | |
body { | |
background-color: #F0F0F0; | |
} | |
#jqm-homeheader { | |
text-align: center; | |
} | |
.viaPoints { | |
display: none; | |
text-size: 0.2em; | |
} | |
.min-width-480px .viaPoints { | |
display: inline; | |
} | |
#extrainfo { | |
visibility: hidden; | |
display: none; | |
} | |
#servicewarning { | |
padding: 1em; | |
margin-bottom: 0.5em; | |
text-size: 0.2em; | |
background-color: #FF9; | |
-moz-border-radius: 15px; | |
border-radius: 15px; | |
} | |
/*#leftcolumn { | |
float: none; | |
} | |
.min-width-768px #leftcolumn { | |
float: left; | |
width: 30%; | |
} | |
#rightcolumn { | |
float: none; | |
} | |
.min-width-768px #rightcolumn { | |
float: right; | |
width: 68%; | |
}*/ | |
#footer { | |
clear:both; | |
text-align:center; | |
} | |
// source http://webaim.org/techniques/skipnav/ | |
#skip a, #skip a:hover, #skip a:visited | |
{ | |
position:absolute; | |
left:0px; | |
top:-500px; | |
width:1px; | |
height:1px; | |
overflow:hidden; | |
} | |
#skip a:active, #skip a:focus | |
{ | |
position:static; | |
width:auto; | |
height:auto; | |
} | |
</style>'; | |
if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { | if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { |
echo '<meta name="apple-mobile-web-app-capable" content="yes" /> | echo '<meta name="apple-mobile-web-app-capable" content="yes" /> |
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> | <meta name="apple-mobile-web-app-status-bar-style" content="black" /> |
<link rel="apple-touch-startup-image" href="startup.png" /> | <link rel="apple-touch-startup-image" href="startup.png" /> |
<link rel="apple-touch-icon" href="apple-touch-icon.png" />'; | <link rel="apple-touch-icon" href="apple-touch-icon.png" />'; |
} | } |
if ($geolocate) { | if ($geolocate) { |
echo "<script> | echo "<script> |
function success(position) { | function success(position) { |
$('#error').val('Location now detected. Please wait for data to load.'); | $('#error').val('Location now detected. Please wait for data to load.'); |
$('#geolocate').val(position.coords.latitude+','+position.coords.longitude); | $('#geolocate').val(position.coords.latitude+','+position.coords.longitude); |
$.ajax({ url: \"include/common.inc.php?geolocate=yes&lat=\"+position.coords.latitude+\"&lon=\"+position.coords.longitude }); | $.ajax({ url: \"include/common.inc.php?geolocate=yes&lat=\"+position.coords.latitude+\"&lon=\"+position.coords.longitude }); |
location.reload(true); | location.reload(true); |
} | } |
function error(msg) { | function error(msg) { |
$('#error').val('Error: '+msg); | $('#error').val('Error: '+msg); |
} | } |
function geolocate() { | function geolocate() { |
if (navigator.geolocation) { | if (navigator.geolocation) { |
var options = { | var options = { |
enableHighAccuracy: true, | enableHighAccuracy: true, |
timeout: 60000, | timeout: 60000, |
maximumAge: 10000 | maximumAge: 10000 |
} | } |
navigator.geolocation.getCurrentPosition(success, error, options); | navigator.geolocation.getCurrentPosition(success, error, options); |
} | } |
} | } |
$(document).ready(function() { | $(document).ready(function() { |
$('#here').click(function(event) { $('#geolocate').val(geolocate()); return false;}); | $('#here').click(function(event) { $('#geolocate').val(geolocate()); return false;}); |
$('#here').show(); | $('#here').show(); |
/*if ($.mobile.media('screen and (min-width: 768px)')) { | |
$('map a:first').click(); | |
$('#settings a:first').click(); | |
}*/ | |
}); | }); |
"; | "; |
if (!isset($_SESSION['lat']) || $_SESSION['lat'] == "") echo "geolocate();"; | if (!isset($_SESSION['lat']) || $_SESSION['lat'] == "") echo "geolocate();"; |
echo "</script> "; | echo "</script> "; |
} | } |
if (isAnalyticsOn()) echo ' | if (isAnalyticsOn()) echo ' |
<script type="text/javascript">' . " | <script type="text/javascript">' . " |
var _gaq = _gaq || []; | var _gaq = _gaq || []; |
_gaq.push(['_setAccount', 'UA-22173039-1']); | _gaq.push(['_setAccount', 'UA-22173039-1']); |
_gaq.push(['_trackPageview']); | _gaq.push(['_trackPageview']); |
_gaq.push(['_trackPageLoadTime']); | _gaq.push(['_trackPageLoadTime']); |
</script>"; | </script>"; |
echo '</head> | echo '</head> |
<body> | <body> |
<div id="skip"> | <div id="skip"> |
<a href="#maincontent">Skip to content</a> | <a href="#maincontent">Skip to content</a> |
</div> | </div> |
'; | '; |
if ($opendiv) { | if ($opendiv) { |
echo '<div data-role="page"> | echo '<div data-role="page"> |
<div data-role="header" data-position="inline"> | <div data-role="header" data-position="inline"> |
<a href="' . (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "javascript:history.go(-1)") . '" data-icon="arrow-l" data-rel="back" class="ui-btn-left">Back</a> | <a href="' . (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "javascript:history.go(-1)") . '" data-icon="arrow-l" data-rel="back" class="ui-btn-left">Back</a> |
<h1>' . $pageTitle . '</h1> | <h1>' . $pageTitle . '</h1> |
<a href="'.$labsPath.'/index.php" data-icon="home" class="ui-btn-right">Home</a> | <a href="' . $labsPath . '/index.php" data-icon="home" class="ui-btn-right">Home</a> |
</div><!-- /header --> | </div><!-- /header --> |
<a name="maincontent" id="maincontent"></a> | <a name="maincontent" id="maincontent"></a> |
<div data-role="content"> '; | <div data-role="content"> '; |
$overrides = getServiceOverride(); | $overrides = getServiceOverride(); |
if ($overrides['service_id']) { | if ($overrides['service_id']) { |
if ($overrides['service_id'] == "noservice") { | if ($overrides['service_id'] == "noservice") { |
echo '<div id="servicewarning">Buses are <strong>not running today</strong> due to industrial action/public holiday. See <a | echo '<div id="servicewarning">Buses are <strong>not running today</strong> due to industrial action/public holiday. See <a |
href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>'; | href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>'; |
} | } |
else { | else { |
echo '<div id="servicewarning">Buses are running on an altered timetable today due to industrial action/public holiday. See <a href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>'; | echo '<div id="servicewarning">Buses are running on an altered timetable today due to industrial action/public holiday. See <a href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>'; |
} | |
} | } |
} | } |
if ($serviceAlertsEnabled) { | |
$serviceAlerts = getServiceAlerts("network","network"); | |
foreach ($serviceAlerts['entities'] as $entity) { | |
echo "<div id='servicewarning'>".date("F j, g:i a",strtotime($entity['alert']['active_period']['start']))." to ". date("F j, g:i a", strtotime($entity['alert']['active_period']['end']))."<br>Warning: {$entity['alert']['description']['translation']} | |
<br><a href='{$entity['alert']['url']['translation']}'>Source</a> </div>"; | |
} | |
} | |
} | |
} | } |
function include_footer() | function include_footer() |
{ | { |
global $labsPath; | |
global $labsPath; | echo '<div id="footer"><a href="' . $labsPath . 'about.php">About/Contact Us</a> <a href="' . $labsPath . 'feedback.php">Feedback/Bug Report</a> <a href="' . $labsPath . 'privacy.php">Privacy Policy</a>'; |
echo '<div id="footer"><a href="'.$labsPath.'about.php">About/Contact Us</a> <a href="'.$labsPath.'feedback.php">Feedback/Bug Report</a> <a href="'.$labsPath.'privacy.php">Privacy Policy</a>'; | |
echo '</div>'; | echo '</div>'; |
if (isAnalyticsOn()) { | if (isAnalyticsOn()) { |
echo "<script> (function() { | echo "<script> (function() { |
var ga = document.createElement('script'); ga.type = | var ga = document.createElement('script'); ga.type = |
'text/javascript'; ga.async = true; | 'text/javascript'; ga.async = true; |
ga.src = ('https:' == document.location.protocol ? | ga.src = ('https:' == document.location.protocol ? |
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
var s = document.getElementsByTagName('script')[0]; | var s = document.getElementsByTagName('script')[0]; |
s.parentNode.insertBefore(ga, s); | s.parentNode.insertBefore(ga, s); |
})();</script>"; | })();</script>"; |
$googleAnalyticsImageUrl = googleAnalyticsGetImageUrl(); | $googleAnalyticsImageUrl = googleAnalyticsGetImageUrl(); |
echo '<noscript><img src="' . $googleAnalyticsImageUrl . '" /></noscript>'; | echo '<noscript><img src="' . $googleAnalyticsImageUrl . '" /></noscript>'; |
} | |
} | echo "\n</div></div></body></html>"; |
echo "\n</div></div></body></html>"; | } |
} | function placeSettings() |
function timePlaceSettings($geolocate = false) | |
{ | { |
global $service_periods; | global $service_periods; |
$geoerror = false; | $geoerror = false; |
if ($geolocate == true) { | |
$geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == ""; | $geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == ""; |
} | |
echo '<div id="error">'; | echo '<div id="error">'; |
if ($geoerror) { | if ($geoerror) { |
echo 'Sorry, but your location could not currently be detected. | echo 'Sorry, but your location could not currently be detected. |
Please allow location permission, wait for your location to be detected, | Please allow location permission, wait for your location to be detected, |
or enter an address/co-ordinates in the box below.'; | or enter an address/co-ordinates in the box below.'; |
} | } |
echo '</div>'; | echo '</div>'; |
echo '<div id="settings" data-role="collapsible" data-collapsed="' . !$geoerror . '"> | echo '<div id="settings" data-role="collapsible" data-collapsed="' . !$geoerror . '"> |
<h3>Change Time/Place (' . (isset($_SESSION['time']) ? $_SESSION['time'] : "Current Time,") . ' ' . ucwords(service_period()) . ')...</h3> | <h3>Change Location...</h3> |
<form action="' . basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING'] . '" method="post"> | <form action="' . basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING'] . '" method="post"> |
<div class="ui-body"> | <div class="ui-body"> |
<div data-role="fieldcontain"> | <div data-role="fieldcontain"> |
<label for="geolocate"> Current Location: </label> | <label for="geolocate"> Current Location: </label> |
<input type="text" id="geolocate" name="geolocate" value="' . (isset($_SESSION['lat']) && isset($_SESSION['lon']) ? $_SESSION['lat'] . "," . $_SESSION['lon'] : "Enter co-ordinates or address here") . '"/> <a href="#" style="display:none" name="here" id="here">Here?</a> | <input type="text" id="geolocate" name="geolocate" value="' . (isset($_SESSION['lat']) && isset($_SESSION['lon']) ? $_SESSION['lat'] . "," . $_SESSION['lon'] : "Enter co-ordinates or address here") . '"/> <a href="#" style="display:none" name="here" id="here">Here?</a> |
</div> | </div> |
<div data-role="fieldcontain"> | |
<label for="time"> Time: </label> | |
<input type="time" name="time" id="time" value="' . (isset($_SESSION['time']) ? $_SESSION['time'] : date("H:i")) . '"/> | |
<a href="#" name="currentTime" id="currentTime" onClick="var d = new Date();' . "$('#time').val(d.getHours() +':'+ (d.getMinutes().toString().length == 1 ? '0'+ d.getMinutes(): d.getMinutes()));" . '">Current Time?</a> | |
</div> | |
<div data-role="fieldcontain"> | |
<label for="service_period"> Service Period: </label> | |
<select name="service_period" id="service_period">'; | |
foreach ($service_periods as $service_period) { | |
echo "<option value=\"$service_period\"" . (service_period() === $service_period ? " SELECTED" : "") . '>' . ucwords($service_period) . '</option>'; | |
} | |
echo '</select> | |
<a href="#" style="display:none" name="currentPeriod" id="currentPeriod">Current Period?</a> | |
</div> | |
<input type="submit" value="Update"/> | <input type="submit" value="Update"/> |
</div></form> | </div></form> |
</div>'; | </div>'; |
} | } |
function trackEvent($category, $action, $label = "", $value = - 1) | function trackEvent($category, $action, $label = "", $value = - 1) |
{ | { |
if (isAnalyticsOn()) { | if (isAnalyticsOn()) { |
echo "\n<script> _gaq.push(['_trackEvent', '$category', '$action'" . ($label != "" ? ", '$label'" : "") . ($value != - 1 ? ", $value" : "") . "]);</script>"; | echo "\n<script> _gaq.push(['_trackEvent', '$category', '$action'" . ($label != "" ? ", '$label'" : "") . ($value != - 1 ? ", $value" : "") . "]);</script>"; |
} | } |
} | } |
?> | ?> |
<?php | <?php |
$service_periods = Array( | $service_periods = Array( |
'sunday', | 'sunday', |
'saturday', | 'saturday', |
'weekday' | 'weekday' |
); | ); |
function service_period($date = "") | function service_period($date = "") |
{ | { |
if (isset($_SESSION['service_period'])) return $_SESSION['service_period']; | if (isset($_SESSION['service_period'])) return $_SESSION['service_period']; |
$override = getServiceOverride($date); | $override = getServiceOverride($date); |
if ($override['service_id']){ | if ($override['service_id']){ |
return $override['service_id']; | return $override['service_id']; |
} | } |
switch (date('w',($date != "" ? $date : time()))) { | switch (date('w',($date != "" ? $date : time()))) { |
case 0: | case 0: |
return 'sunday'; | return 'sunday'; |
case 6: | case 6: |
return 'saturday'; | return 'saturday'; |
default: | default: |
return 'weekday'; | return 'weekday'; |
} | } |
} | } |
function midnight_seconds($time = "") | function midnight_seconds($time = "") |
{ | { |
// from http://www.perturb.org/display/Perlfunc__Seconds_Since_Midnight.html | // from http://www.perturb.org/display/Perlfunc__Seconds_Since_Midnight.html |
if ($time != "") { | if ($time != "") { |
return (date("G", $time) * 3600) + (date("i", $time) * 60) + date("s", $time); | return (date("G", $time) * 3600) + (date("i", $time) * 60) + date("s", $time); |
} | } |
if (isset($_SESSION['time'])) { | if (isset($_SESSION['time'])) { |
$time = strtotime($_SESSION['time']); | $time = strtotime($_SESSION['time']); |
return (date("G", $time) * 3600) + (date("i", $time) * 60) + date("s", $time); | return (date("G", $time) * 3600) + (date("i", $time) * 60) + date("s", $time); |
} | } |
return (date("G") * 3600) + (date("i") * 60) + date("s"); | return (date("G") * 3600) + (date("i") * 60) + date("s"); |
} | } |
function midnight_seconds_to_time($seconds) | function midnight_seconds_to_time($seconds) |
{ | { |
if ($seconds > 0) { | if ($seconds > 0) { |
$midnight = mktime(0, 0, 0, date("n") , date("j") , date("Y")); | $midnight = mktime(0, 0, 0, date("n") , date("j") , date("Y")); |
return date("h:ia", $midnight + $seconds); | return date("h:ia", $midnight + $seconds); |
} | } |
else { | else { |
return ""; | return ""; |
} | } |
} | } |
function getServiceAlerts($filter_class, $filter_id) { | |
/* | |
also need last modified epoch of client gtfs | |
- add,remove,patch,inform (null) | |
- stop | |
- trip | |
- network | |
- classes (WHERE=) | |
- route (short_name or route_id) | |
- street | |
- stop | |
- trip | |
Currently support: | |
network inform | |
trip patch: stop remove | |
street inform: route inform, trip inform, stop inform | |
route patch: trip remove | |
*/ | |
$return = Array(); | |
$return['header']['gtrtfs_version'] = "1"; | |
$return['header']['timestamp'] = time(); | |
$return['entities'] = Array(); | |
foreach(getCurrentAlerts() as $alert) { | |
$informedEntities = getInformedAlerts($alert['id'],$_REQUEST['filter_class'],$_REQUEST['filter_id']); | |
if (sizeof($informedEntities) >0) { | |
$entity = Array(); | |
$entity['id'] = $alert['id']; | |
$entity['alert']['active_period']['start'] = $alert['start']; | |
$entity['alert']['active_period']['end'] = $alert['end']; | |
$entity['alert']['url']['translation'] = $alert['url']; | |
$entity['alert']['description']['translation'] = $alert['description']; | |
foreach ($informedEntities as $informedEntity) { | |
$informed = Array(); | |
$informed[$informedEntity['informed_class']."_id"] = $informedEntity['informed_id']; | |
if ($informedEntity['informed_action'] != "") $informed["x-action"] = $informedEntity['informed_action']; | |
$informed[$informedEntity['class']."_type"] = $informedEntity['type']; | |
$entity['informed'][] = $informed; | |
} | |
$return['entities'][] = $entity; | |
} | |
} | |
return $return; | |
} | |
function getServiceAlertsByClass() { | |
$return = Array(); | |
$alerts = getServiceAlerts("",""); | |
foreach ($alerts['entities'] as $entity) { | |
foreach ($entity['informed'] as $informed) { | |
foreach($informed as $key => $value){ | |
if (strpos("_id",$key) > 0) { | |
$parts = explode($key); | |
$class = $parts[0]; | |
$id = $value; | |
} | |
} | |
$return[$class][$id][]['entity'] = $entity; | |
$return[$class][$id][]['action'] = $informed["x-action"]; | |
} | |
} | |
} | |
?> | ?> |
<?php | <?php |
date_default_timezone_set('Australia/ACT'); | date_default_timezone_set('Australia/ACT'); |
$debugOkay = Array( | $debugOkay = Array( |
"session", | "session", |
"json", | "json", |
"phperror", | "phperror", |
"awsotp", | "awsotp", |
//"squallotp", | //"squallotp", |
"vanilleotp", | //"vanilleotp", |
"database", | "database", |
"other" | "other" |
); | ); |
$serviceAlertsEnabled = true; | |
$cloudmadeAPIkey = "daa03470bb8740298d4b10e3f03d63e6"; | $cloudmadeAPIkey = "daa03470bb8740298d4b10e3f03d63e6"; |
$googleMapsAPIkey = "ABQIAAAA95XYXN0cki3Yj_Sb71CFvBTPaLd08ONybQDjcH_VdYtHHLgZvRTw2INzI_m17_IoOUqH3RNNmlTk1Q"; | $googleMapsAPIkey = "ABQIAAAA95XYXN0cki3Yj_Sb71CFvBTPaLd08ONybQDjcH_VdYtHHLgZvRTw2INzI_m17_IoOUqH3RNNmlTk1Q"; |
$otpAPIurl = 'http://localhost:8080/opentripplanner-api-webapp/'; | $otpAPIurl = 'http://localhost:8080/opentripplanner-api-webapp/'; |
if (isDebug("awsotp") || php_uname('n') == "maxious.xen.prgmr.com") { | if (isDebug("awsotp") || php_uname('n') == "maxious.xen.prgmr.com") { |
$otpAPIurl = 'http://bus-main.lambdacomplex.org:8080/opentripplanner-api-webapp/'; | $otpAPIurl = 'http://bus-main.lambdacomplex.org:8080/opentripplanner-api-webapp/'; |
} | } |
if (isDebug("dotcloudotp") || php_uname('n') == "actbus-www") { | if (isDebug("dotcloudotp") || php_uname('n') == "actbus-www") { |
$otpAPIurl = 'http://otp.actbus.dotcloud.com/opentripplanner-api-webapp/'; | $otpAPIurl = 'http://otp.actbus.dotcloud.com/opentripplanner-api-webapp/'; |
} | } |
if (isDebug("squallotp")) { | if (isDebug("squallotp")) { |
$otpAPIurl = 'http://10.0.1.108:5080/opentripplanner-api-webapp/'; | $otpAPIurl = 'http://10.0.1.108:5080/opentripplanner-api-webapp/'; |
} | } |
if (isDebug("vanilleotp")) { | if (isDebug("vanilleotp")) { |
$otpAPIurl = 'http://10.0.1.135:8080/opentripplanner-api-webapp/'; | $otpAPIurl = 'http://10.0.1.135:8080/opentripplanner-api-webapp/'; |
} | } |
if (isDebug("phperror")) error_reporting(E_ALL ^ E_NOTICE); | if (isDebug("phperror")) error_reporting(E_ALL ^ E_NOTICE); |
$labsPath = ""; | $labsPath = ""; |
if (strstr($_SERVER['PHP_SELF'],"labs")) $labsPath = "../"; | if (strstr($_SERVER['PHP_SELF'],"labs")) $labsPath = "../"; |
function isDebugServer() | function isDebugServer() |
{ | { |
return !isset($_SERVER['SERVER_NAME']) || $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "10.1.0.4" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" ; | return php_sapi_name() == "cli" || isset($_SERVER['SERVER_NAME']) && ( $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "10.1.0.4" || $_SERVER['SERVER_NAME'] == |
"localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1") ; | |
} | } |
include_once ("common-geo.inc.php"); | include_once ("common-geo.inc.php"); |
include_once ("common-net.inc.php"); | include_once ("common-net.inc.php"); |
include_once ("common-transit.inc.php"); | include_once ("common-transit.inc.php"); |
include_once ("common-db.inc.php"); | include_once ("common-db.inc.php"); |
include_once ("common-request.inc.php"); | include_once ("common-request.inc.php"); |
include_once ("common-session.inc.php"); | include_once ("common-session.inc.php"); |
include_once ("common-auth.inc.php"); | |
include_once ("common-template.inc.php"); | include_once ("common-template.inc.php"); |
function isAnalyticsOn() | function isAnalyticsOn() |
{ | { |
return !isDebugServer(); | return !isDebugServer(); |
} | } |
function isDebug($debugReason = "other") | function isDebug($debugReason = "other") |
{ | { |
global $debugOkay; | global $debugOkay; |
return in_array($debugReason, $debugOkay, false) && isDebugServer(); | return in_array($debugReason, $debugOkay, false) && isDebugServer(); |
} | } |
function debug($msg, $debugReason = "other") | function debug($msg, $debugReason = "other") |
{ | { |
if (isDebug($debugReason)) echo "\n<!-- " . date(DATE_RFC822) . "\n $msg -->\n"; | if (isDebug($debugReason)) echo "\n<!-- " . date(DATE_RFC822) . "\n $msg -->\n"; |
} | } |
function isJQueryMobileDevice() | function isJQueryMobileDevice() |
{ | { |
// http://forum.jquery.com/topic/what-is-the-best-way-to-detect-all-useragents-which-can-handle-jquery-mobile#14737000002087897 | // http://forum.jquery.com/topic/what-is-the-best-way-to-detect-all-useragents-which-can-handle-jquery-mobile#14737000002087897 |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | $user_agent = $_SERVER['HTTP_USER_AGENT']; |
return preg_match('/iphone/i', $user_agent) || preg_match('/android/i', $user_agent) || preg_match('/webos/i', $user_agent) || preg_match('/ios/i', $user_agent) || preg_match('/bada/i', $user_agent) || preg_match('/maemo/i', $user_agent) || preg_match('/meego/i', $user_agent) || preg_match('/fennec/i', $user_agent) || (preg_match('/symbian/i', $user_agent) && preg_match('/s60/i', $user_agent) && $browser['majorver'] >= 5) || (preg_match('/symbian/i', $user_agent) && preg_match('/platform/i', $user_agent) && $browser['majorver'] >= 3) || (preg_match('/blackberry/i', $user_agent) && $browser['majorver'] >= 5) || (preg_match('/opera mobile/i', $user_agent) && $browser['majorver'] >= 10) || (preg_match('/opera mini/i', $user_agent) && $browser['majorver'] >= 5); | return preg_match('/iphone/i', $user_agent) || preg_match('/android/i', $user_agent) || preg_match('/webos/i', $user_agent) || preg_match('/ios/i', $user_agent) || preg_match('/bada/i', $user_agent) || preg_match('/maemo/i', $user_agent) || preg_match('/meego/i', $user_agent) || preg_match('/fennec/i', $user_agent) || (preg_match('/symbian/i', $user_agent) && preg_match('/s60/i', $user_agent) && $browser['majorver'] >= 5) || (preg_match('/symbian/i', $user_agent) && preg_match('/platform/i', $user_agent) && $browser['majorver'] >= 3) || (preg_match('/blackberry/i', $user_agent) && $browser['majorver'] >= 5) || (preg_match('/opera mobile/i', $user_agent) && $browser['majorver'] >= 10) || (preg_match('/opera mini/i', $user_agent) && $browser['majorver'] >= 5); |
} | } |
function isFastDevice() | function isFastDevice() |
{ | { |
$ua = $_SERVER['HTTP_USER_AGENT']; | $ua = $_SERVER['HTTP_USER_AGENT']; |
$fastDevices = Array( | $fastDevices = Array( |
"Mozilla/5.0 (X11;", | "Mozilla/5.0 (X11;", |
"Mozilla/5.0 (Windows;", | "Mozilla/5.0 (Windows;", |
"Mozilla/5.0 (iP", | "Mozilla/5.0 (iP", |
"Mozilla/5.0 (Linux; U; Android", | "Mozilla/5.0 (Linux; U; Android", |
"Mozilla/4.0 (compatible; MSIE" | "Mozilla/4.0 (compatible; MSIE" |
); | ); |
$slowDevices = Array( | $slowDevices = Array( |
"J2ME", | "J2ME", |
"MIDP", | "MIDP", |
"Opera/", | "Opera/", |
"Mozilla/2.0 (compatible;", | "Mozilla/2.0 (compatible;", |
"Mozilla/3.0 (compatible;" | "Mozilla/3.0 (compatible;" |
); | ); |
return true; | return true; |
} | } |
function array_flatten($a, $f = array()) | function array_flatten($a, $f = array()) |
{ | { |
if (!$a || !is_array($a)) return ''; | if (!$a || !is_array($a)) return ''; |
foreach ($a as $k => $v) { | foreach ($a as $k => $v) { |
if (is_array($v)) $f = array_flatten($v, $f); | if (is_array($v)) $f = array_flatten($v, $f); |
else $f[$k] = $v; | else $f[$k] = $v; |
} | } |
return $f; | return $f; |
} | } |
function remove_spaces($string) | function remove_spaces($string) |
{ | { |
return str_replace(' ', '', $string); | return str_replace(' ', '', $string); |
} | } |
function object2array($object) | function object2array($object) |
{ | { |
if (is_object($object)) { | if (is_object($object)) { |
foreach ($object as $key => $value) { | foreach ($object as $key => $value) { |
$array[$key] = $value; | $array[$key] = $value; |
} | } |
} | } |
else { | else { |
$array = $object; | $array = $object; |
} | } |
return $array; | return $array; |
} | } |
function startsWith($haystack, $needle, $case = true) | function startsWith($haystack, $needle, $case = true) |
{ | { |
if ($case) { | if ($case) { |
return (strcmp(substr($haystack, 0, strlen($needle)) , $needle) === 0); | return (strcmp(substr($haystack, 0, strlen($needle)) , $needle) === 0); |
} | } |
return (strcasecmp(substr($haystack, 0, strlen($needle)) , $needle) === 0); | return (strcasecmp(substr($haystack, 0, strlen($needle)) , $needle) === 0); |
} | } |
function endsWith($haystack, $needle, $case = true) | function endsWith($haystack, $needle, $case = true) |
{ | { |
if ($case) { | if ($case) { |
return (strcmp(substr($haystack, strlen($haystack) - strlen($needle)) , $needle) === 0); | return (strcmp(substr($haystack, strlen($haystack) - strlen($needle)) , $needle) === 0); |
} | } |
return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)) , $needle) === 0); | return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)) , $needle) === 0); |
} | } |
function bracketsMeanNewLine($input) | function bracketsMeanNewLine($input) |
{ | { |
return str_replace(")", "</small>", str_replace("(", "<br><small>", $input)); | return str_replace(")", "</small>", str_replace("(", "<br><small>", $input)); |
} | } |
function sksort(&$array, $subkey = "id", $sort_ascending = false) | function sksort(&$array, $subkey = "id", $sort_ascending = false) |
{ | { |
if (count($array)) $temp_array[key($array) ] = array_shift($array); | if (count($array)) $temp_array[key($array) ] = array_shift($array); |
foreach ($array as $key => $val) { | foreach ($array as $key => $val) { |
$offset = 0; | $offset = 0; |
$found = false; | $found = false; |
foreach ($temp_array as $tmp_key => $tmp_val) { | foreach ($temp_array as $tmp_key => $tmp_val) { |
if (!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) { | if (!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) { |
$temp_array = array_merge((array)array_slice($temp_array, 0, $offset) , array( | $temp_array = array_merge((array)array_slice($temp_array, 0, $offset) , array( |
$key => $val | $key => $val |
) , array_slice($temp_array, $offset)); | ) , array_slice($temp_array, $offset)); |
$found = true; | $found = true; |
} | } |
$offset++; | $offset++; |
} | } |
if (!$found) $temp_array = array_merge($temp_array, array( | if (!$found) $temp_array = array_merge($temp_array, array( |
$key => $val | $key => $val |
)); | )); |
} | } |
if ($sort_ascending) $array = array_reverse($temp_array); | if ($sort_ascending) $array = array_reverse($temp_array); |
else $array = $temp_array; | else $array = $temp_array; |
} | } |
function sktimesort(&$array, $subkey = "id", $sort_ascending = false) | function sktimesort(&$array, $subkey = "id", $sort_ascending = false) |
{ | { |
if (count($array)) $temp_array[key($array) ] = array_shift($array); | if (count($array)) $temp_array[key($array) ] = array_shift($array); |
foreach ($array as $key => $val) { | foreach ($array as $key => $val) { |
$offset = 0; | $offset = 0; |
$found = false; | $found = false; |
foreach ($temp_array as $tmp_key => $tmp_val) { | foreach ($temp_array as $tmp_key => $tmp_val) { |
if (!$found and strtotime($val[$subkey]) > strtotime($tmp_val[$subkey])) { | if (!$found and strtotime($val[$subkey]) > strtotime($tmp_val[$subkey])) { |
$temp_array = array_merge((array)array_slice($temp_array, 0, $offset) , array( | $temp_array = array_merge((array)array_slice($temp_array, 0, $offset) , array( |
$key => $val | $key => $val |
) , array_slice($temp_array, $offset)); | ) , array_slice($temp_array, $offset)); |
$found = true; | $found = true; |
} | } |
$offset++; | $offset++; |
} | } |
if (!$found) $temp_array = array_merge($temp_array, array( | if (!$found) $temp_array = array_merge($temp_array, array( |
$key => $val | $key => $val |
)); | )); |
} | } |
if ($sort_ascending && isset($temp_array)) $array = array_reverse($temp_array); | if ($sort_ascending && isset($temp_array)) $array = array_reverse($temp_array); |
else $array = $temp_array; | else $array = $temp_array; |
} | } |
function r_implode( $glue, $pieces ) | function r_implode( $glue, $pieces ) |
{ | { |
foreach( $pieces as $r_pieces ) | foreach( $pieces as $r_pieces ) |
{ | { |
if( is_array( $r_pieces ) ) | if( is_array( $r_pieces ) ) |
{ | { |
$retVal[] = r_implode( $glue, $r_pieces ); | $retVal[] = r_implode( $glue, $r_pieces ); |
} | } |
else | else |
{ | { |
$retVal[] = $r_pieces; | $retVal[] = $r_pieces; |
} | } |
} | } |
return implode( $glue, $retVal ); | return implode( $glue, $retVal ); |
} | } |
?> | ?> |
<?php | <?php |
function getRoute($routeID) | function getRoute($routeID) |
{ | |
global $conn; | { |
$query = "Select * from routes where route_id = :routeID LIMIT 1"; | global $conn; |
debug($query, "database"); | $query = "Select * from routes where route_id = :routeID LIMIT 1"; |
$query = $conn->prepare($query); | debug($query, "database"); |
$query->bindParam(":routeID", $routeID); | $query = $conn -> prepare($query); |
$query->execute(); | $query -> bindParam(":routeID", $routeID); |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetch(PDO::FETCH_ASSOC); | } |
} | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | |
function getRouteByFullName($routeFullName) | function getRouteByFullName($routeFullName) |
{ | |
global $conn; | { |
$query = "Select * from routes where route_short_name||route_long_name = :routeFullName LIMIT 1"; | global $conn; |
debug($query, "database"); | $query = "Select * from routes where route_short_name||route_long_name = :routeFullName LIMIT 1"; |
$query = $conn->prepare($query); | debug($query, "database"); |
$query->bindParam(":routeFullName", $routeFullName); | $query = $conn -> prepare($query); |
$query->execute(); | $query -> bindParam(":routeFullName", $routeFullName); |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetch(PDO::FETCH_ASSOC); | } |
} | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | |
function getRoutes() | function getRoutes() |
{ | |
global $conn; | { |
$query = "Select * from routes order by route_short_name;"; | global $conn; |
debug($query, "database"); | $query = "Select * from routes order by route_short_name;"; |
$query = $conn->prepare($query); | debug($query, "database"); |
$query->execute(); | $query = $conn -> prepare($query); |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetchAll(); | } |
} | return $query -> fetchAll(); |
} | |
function getRoutesByNumber($routeNumber = "") | function getRoutesByNumber($routeNumber = "") |
{ | |
global $conn; | { |
if ($routeNumber != "") { | global $conn; |
$query = "Select distinct routes.route_id,routes.route_short_name,routes.route_long_name,service_id from routes join trips on trips.route_id = | if ($routeNumber != "") { |
$query = "Select distinct routes.route_id,routes.route_short_name,routes.route_long_name,service_id from routes join trips on trips.route_id = | |
routes.route_id join stop_times on stop_times.trip_id = trips.trip_id | routes.route_id join stop_times on stop_times.trip_id = trips.trip_id |
where route_short_name = :routeNumber OR route_short_name LIKE :routeNumber2 order by route_short_name;"; | where route_short_name = :routeNumber OR route_short_name LIKE :routeNumber2 order by route_short_name;"; |
} | } |
else { | else { |
$query = "SELECT DISTINCT route_short_name from routes order by route_short_name"; | $query = "SELECT DISTINCT route_short_name from routes order by route_short_name"; |
} | } |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
if ($routeNumber != "") { | if ($routeNumber != "") { |
$query->bindParam(":routeNumber", $routeNumber); | $query -> bindParam(":routeNumber", $routeNumber); |
$routeNumber2 = "% ".$routeNumber; | $routeNumber2 = "% " . $routeNumber; |
$query->bindParam(":routeNumber2", $routeNumber2); | $query -> bindParam(":routeNumber2", $routeNumber2); |
} | } |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getRoutesByNumberSeries($routeNumberSeries = "") | function getRoutesByNumberSeries($routeNumberSeries = "") |
{ | |
global $conn; | { |
if (strlen($routeNumberSeries) == 1) { | global $conn; |
return getRoutesByNumber($routeNumberSeries); | if (strlen($routeNumberSeries) == 1) { |
} | return getRoutesByNumber($routeNumberSeries); |
$seriesMin = substr($routeNumberSeries, 0, -1) . "0"; | } |
$seriesMax = substr($routeNumberSeries, 0, -1) . "9"; | $seriesMin = substr($routeNumberSeries, 0, -1) . "0"; |
$query = "Select distinct routes.route_id,routes.route_short_name,routes.route_long_name,service_id from routes join trips on trips.route_id = | $seriesMax = substr($routeNumberSeries, 0, -1) . "9"; |
$query = "Select distinct routes.route_id,routes.route_short_name,routes.route_long_name,service_id from routes join trips on trips.route_id = | |
routes.route_id join stop_times on stop_times.trip_id = trips.trip_id where to_number(route_short_name, 'FM999') between :seriesMin and :seriesMax OR route_short_name LIKE :routeNumberSeries order by route_short_name;"; | routes.route_id join stop_times on stop_times.trip_id = trips.trip_id where to_number(route_short_name, 'FM999') between :seriesMin and :seriesMax OR route_short_name LIKE :routeNumberSeries order by route_short_name;"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":seriesMin", $seriesMin); | $query -> bindParam(":seriesMin", $seriesMin); |
$query->bindParam(":seriesMax", $seriesMax); | $query -> bindParam(":seriesMax", $seriesMax); |
$routeNumberSeries = "% ".substr($routeNumberSeries, 0, -1)."%"; | $routeNumberSeries = "% " . substr($routeNumberSeries, 0, -1) . "%"; |
$query->bindParam(":routeNumberSeries", $routeNumberSeries); | $query -> bindParam(":routeNumberSeries", $routeNumberSeries); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getRouteNextTrip($routeID) | function getRouteNextTrip($routeID) |
{ | |
global $conn; | { |
$query = "select * from routes join trips on trips.route_id = routes.route_id | global $conn; |
$query = "select * from routes join trips on trips.route_id = routes.route_id | |
join stop_times on stop_times.trip_id = trips.trip_id where | join stop_times on stop_times.trip_id = trips.trip_id where |
arrival_time > :currentTime and routes.route_id = :routeID order by | arrival_time > :currentTime and routes.route_id = :routeID order by |
arrival_time limit 1"; | arrival_time limit 1"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":currentTime", current_time()); | $query -> bindParam(":currentTime", current_time()); |
$query->bindParam(":routeID", $routeID); | $query -> bindParam(":routeID", $routeID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
$r = $query->fetch(PDO::FETCH_ASSOC); | $r = $query -> fetch(PDO :: FETCH_ASSOC); |
// past last trip of the day special case | // past last trip of the day special case |
if (sizeof($r) < 16) { | if (sizeof($r) < 16) { |
$query = "select * from routes join trips on trips.route_id = routes.route_id | $query = "select * from routes join trips on trips.route_id = routes.route_id |
join stop_times on stop_times.trip_id = trips.trip_id where routes.route_id = :routeID order by | join stop_times on stop_times.trip_id = trips.trip_id where routes.route_id = :routeID order by |
arrival_time DESC limit 1"; | arrival_time DESC limit 1"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":routeID", $routeID); | $query -> bindParam(":routeID", $routeID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
$r = $query->fetch(PDO::FETCH_ASSOC); | $r = $query -> fetch(PDO :: FETCH_ASSOC); |
} | } |
return $r; | return $r; |
} | } |
function getTimeInterpolatedRouteAtStop($routeID, $stop_id) | function getTimeInterpolatedRouteAtStop($routeID, $stop_id) |
{ | |
$nextTrip = getRouteNextTrip($routeID); | { |
if ($nextTrip['trip_id']) { | $nextTrip = getRouteNextTrip($routeID); |
foreach (getTimeInterpolatedTrip($nextTrip['trip_id']) as $tripStop) { | if ($nextTrip['trip_id']) { |
if ($tripStop['stop_id'] == $stop_id) return $tripStop; | foreach (getTimeInterpolatedTrip($nextTrip['trip_id']) as $tripStop) { |
} | if ($tripStop['stop_id'] == $stop_id) return $tripStop; |
} | } |
return Array(); | } |
} | return Array(); |
} | |
function getRouteTrips($routeID) | function getRouteTrips($routeID) |
{ | |
global $conn; | { |
$query = "select routes.route_id,trips.trip_id,service_id,arrival_time, stop_id, stop_sequence from routes join trips on trips.route_id = routes.route_id | global $conn; |
$query = "select routes.route_id,trips.trip_id,service_id,arrival_time, stop_id, stop_sequence from routes join trips on trips.route_id = routes.route_id | |
join stop_times on stop_times.trip_id = trips.trip_id where routes.route_id = :routeID and stop_sequence = '1' order by | join stop_times on stop_times.trip_id = trips.trip_id where routes.route_id = :routeID and stop_sequence = '1' order by |
arrival_time "; | arrival_time "; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":routeID", $routeID); | $query -> bindParam(":routeID", $routeID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getRoutesByDestination($destination = "", $service_period = "") | function getRoutesByDestination($destination = "", $service_period = "") |
{ | |
global $conn; | { |
if ($service_period == "") $service_period = service_period(); | global $conn; |
if ($destination != "") { | if ($service_period == "") $service_period = service_period(); |
$query = "SELECT DISTINCT trips.route_id,route_short_name,route_long_name, service_id | if ($destination != "") { |
$query = "SELECT DISTINCT trips.route_id,route_short_name,route_long_name, service_id | |
FROM stop_times join trips on trips.trip_id = | FROM stop_times join trips on trips.trip_id = |
stop_times.trip_id join routes on trips.route_id = routes.route_id | stop_times.trip_id join routes on trips.route_id = routes.route_id |
WHERE route_long_name = :destination AND service_id=:service_period order by route_short_name"; | WHERE route_long_name = :destination AND service_id=:service_period order by route_short_name"; |
} | } |
else { | else { |
$query = "SELECT DISTINCT route_long_name | $query = "SELECT DISTINCT route_long_name |
FROM stop_times join trips on trips.trip_id = | FROM stop_times join trips on trips.trip_id = |
stop_times.trip_id join routes on trips.route_id = routes.route_id | stop_times.trip_id join routes on trips.route_id = routes.route_id |
WHERE service_id= :service_period order by route_long_name"; | WHERE service_id= :service_period order by route_long_name"; |
} | } |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":service_period", $service_period); | $query -> bindParam(":service_period", $service_period); |
if ($destination != "") $query->bindParam(":destination", $destination); | if ($destination != "") $query -> bindParam(":destination", $destination); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getRoutesBySuburb($suburb, $service_period = "") | function getRoutesBySuburb($suburb, $service_period = "") |
{ | |
if ($service_period == "") $service_period = service_period(); | { |
global $conn; | if ($service_period == "") $service_period = service_period(); |
$query = "SELECT DISTINCT service_id,trips.route_id,route_short_name,route_long_name | global $conn; |
$query = "SELECT DISTINCT service_id,trips.route_id,route_short_name,route_long_name | |
FROM stop_times join trips on trips.trip_id = stop_times.trip_id | FROM stop_times join trips on trips.trip_id = stop_times.trip_id |
join routes on trips.route_id = routes.route_id | join routes on trips.route_id = routes.route_id |
join stops on stops.stop_id = stop_times.stop_id | join stops on stops.stop_id = stop_times.stop_id |
WHERE zone_id LIKE ':suburb AND service_id=:service_period ORDER BY route_short_name"; | WHERE zone_id LIKE ':suburb AND service_id=:service_period ORDER BY route_short_name"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":service_period", $service_period); | $query -> bindParam(":service_period", $service_period); |
$suburb = "%" . $suburb . ";%"; | $suburb = "%" . $suburb . ";%"; |
$query->bindParam(":suburb", $suburb); | $query -> bindParam(":suburb", $suburb); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getRoutesNearby($lat, $lng, $limit = "", $distance = 500) | function getRoutesNearby($lat, $lng, $limit = "", $distance = 500) |
{ | |
if ($service_period == "") $service_period = service_period(); | { |
if ($limit != "") $limitSQL = " LIMIT :limit "; | if ($service_period == "") $service_period = service_period(); |
global $conn; | if ($limit != "") $limitSQL = " LIMIT :limit "; |
$query = "SELECT service_id,trips.route_id,route_short_name,route_long_name,min(stops.stop_id) as stop_id, | global $conn; |
$query = "SELECT service_id,trips.route_id,route_short_name,route_long_name,min(stops.stop_id) as stop_id, | |
min(ST_Distance(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), FALSE)) as distance | min(ST_Distance(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), FALSE)) as distance |
FROM stop_times | FROM stop_times |
join trips on trips.trip_id = stop_times.trip_id | join trips on trips.trip_id = stop_times.trip_id |
join routes on trips.route_id = routes.route_id | join routes on trips.route_id = routes.route_id |
join stops on stops.stop_id = stop_times.stop_id | join stops on stops.stop_id = stop_times.stop_id |
WHERE service_id=:service_period | WHERE service_id=:service_period |
AND ST_DWithin(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), :distance, FALSE) | AND ST_DWithin(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), :distance, FALSE) |
group by service_id,trips.route_id,route_short_name,route_long_name | group by service_id,trips.route_id,route_short_name,route_long_name |
order by distance $limitSQL"; | order by distance $limitSQL"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":service_period", $service_period); | $query -> bindParam(":service_period", $service_period); |
$query->bindParam(":distance", $distance); | $query -> bindParam(":distance", $distance); |
if ($limit != "") $query->bindParam(":limit", $limit); | if ($limit != "") $query -> bindParam(":limit", $limit); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
?> | ?> |
<?php | <?php |
function getServiceOverride($date="") { | function getServiceOverride($date = "") |
global $conn; | { |
$query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1"; | global $conn; |
debug($query,"database"); | $query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1"; |
$query = $conn->prepare($query); // Create a prepared statement | // debug($query,"database"); |
$query->bindParam(":date", date("Ymd",($date != "" ? $date : time()))); | $query = $conn -> prepare($query); // Create a prepared statement |
$query->execute(); | $query -> bindParam(":date", date("Ymd", ($date != "" ? $date : time()))); |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetch(PDO::FETCH_ASSOC); | } |
} | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | |
function getServiceAlert($alertID) | |
{ | |
global $conn; | |
$query = 'SELECT * from servicealerts_alerts where id = :servicealert_id'; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> bindParam(":servicealert_id", $alertID); | |
$query -> execute(); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetch(PDO :: FETCH_ASSOC); | |
} | |
function updateServiceAlert($alertID, $start, $end, $description, $url) | |
{ | |
global $conn; | |
$query = 'update servicealerts_alerts set start=:start, "end"=:end, description=:description, url=:url where id = :servicealert_id'; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> bindParam(":servicealert_id", $alertID); | |
$query -> bindParam(":start", $start); | |
$query -> bindParam(":end", $end); | |
$query -> bindParam(":description", $description); | |
$query -> bindParam(":url", $url); | |
$query -> execute(); | |
print_r($conn -> errorInfo()); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetch(PDO :: FETCH_ASSOC); | |
} | |
function addServiceAlert($start, $end, $description, $url) | |
{ | |
global $conn; | |
$query = 'INSERT INTO servicealerts_alerts (start, "end", description, url) VALUES (:start, :end, :description, :url) '; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> bindParam(":start", $start); | |
$query -> bindParam(":end", $end); | |
$query -> bindParam(":description", $description); | |
$query -> bindParam(":url", $url); | |
$query -> execute(); | |
print_r($conn -> errorInfo()); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetch(PDO :: FETCH_ASSOC); | |
} | |
function getCurrentAlerts() | |
{ | |
global $conn; | |
$query = 'SELECT * from servicealerts_alerts where NOW() > start and NOW() < "end"'; | |
// debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> execute(); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetchAll(); | |
} | |
function getFutureAlerts() | |
{ | |
global $conn; | |
$query = 'SELECT * from servicealerts_alerts where NOW() > start or NOW() < "end"'; | |
// debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> execute(); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetchAll(); | |
} | |
function getInformedAlerts($id, $filter_class, $filter_id) | |
{ | |
global $conn; | |
$query = "SELECT * from servicealerts_informed where servicealert_id = :servicealert_id"; | |
if ($filter_class != "") { | |
$query .= " AND informed_class = :informed_class "; | |
} | |
if ($filter_id != "") { | |
$query .= " AND informed_id = :informed_id "; | |
} | |
// debug($query, "database"); | |
$query = $conn -> prepare($query); | |
if ($filter_class != "") { | |
$query -> bindParam(":informed_class", $filter_class); | |
} | |
if ($filter_id != "") { | |
$query -> bindParam(":informed_id", $filter_id); | |
} | |
$query -> bindParam(":servicealert_id", $id); | |
$query -> execute(); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetchAll(); | |
} | |
function deleteInformedAlert($serviceAlertID, $class, $id) | |
{ | |
global $conn; | |
$query = 'DELETE from servicealerts_informed where servicealert_id = :servicealert_id and informed_class = :informed_class AND informed_id = :informed_id'; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> bindParam(":servicealert_id", $serviceAlertID); | |
$query -> bindParam(":informed_class", $class); | |
$query -> bindParam(":informed_id", $id); | |
$query -> execute(); | |
print_r($conn -> errorInfo()); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return null; | |
} | |
function addInformedAlert($serviceAlertID, $class, $id, $action) | |
{ | |
global $conn; | |
$query = 'INSERT INTO servicealerts_informed (servicealert_id , informed_class , informed_id) VALUES(:servicealert_id ,:informed_class, :informed_id)'; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> bindParam(":servicealert_id", $serviceAlertID); | |
$query -> bindParam(":informed_class", $class); | |
$query -> bindParam(":informed_id", $id); | |
$query -> execute(); | |
print_r($conn -> errorInfo()); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return null; | |
} | |
?> | ?> |
<?php | <?php |
function getStop($stopID) | function getStop($stopID) |
{ | |
global $conn; | { |
$query = "Select * from stops where stop_id = :stopID LIMIT 1"; | global $conn; |
debug($query, "database"); | $query = "Select * from stops where stop_id = :stopID LIMIT 1"; |
$query = $conn->prepare($query); | debug($query, "database"); |
$query->bindParam(":stopID", $stopID); | $query = $conn -> prepare($query); |
$query->execute(); | $query -> bindParam(":stopID", $stopID); |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetch(PDO::FETCH_ASSOC); | } |
} | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | |
function getStops($timingPointsOnly = false, $firstLetter = "", $startsWith = "") | function getStops($timingPointsOnly = false, $firstLetter = "", $startsWith = "") |
{ | |
global $conn; | { |
$conditions = Array(); | global $conn; |
if ($timingPointsOnly) $conditions[] = "substr(stop_code,1,2) != 'Wj'"; | $conditions = Array(); |
if ($firstLetter != "") $conditions[] = "substr(stop_name,1,1) = :firstLetter"; | if ($timingPointsOnly) $conditions[] = "substr(stop_code,1,2) != 'Wj'"; |
if ($startsWith != "") $conditions[] = "stop_name like :startsWith"; | if ($firstLetter != "") $conditions[] = "substr(stop_name,1,1) = :firstLetter"; |
$query = "Select * from stops"; | if ($startsWith != "") $conditions[] = "stop_name like :startsWith"; |
if (sizeof($conditions) > 0) { | $query = "Select * from stops"; |
if (sizeof($conditions) > 1) { | if (sizeof($conditions) > 0) { |
$query.= " Where " . implode(" AND ", $conditions) . " "; | if (sizeof($conditions) > 1) { |
} | $query .= " Where " . implode(" AND ", $conditions) . " "; |
else { | } |
$query.= " Where " . $conditions[0] . " "; | else { |
} | $query .= " Where " . $conditions[0] . " "; |
} | } |
$query.= " order by stop_name;"; | } |
$query = $conn->prepare($query); | $query .= " order by stop_name;"; |
if ($firstLetter != "") $query->bindParam(":firstLetter", $firstLetter); | $query = $conn -> prepare($query); |
if ($firstLetter != "") $query -> bindParam(":firstLetter", $firstLetter); | |
if ($startsWith != "") { | |
$startsWith = $startsWith."%"; | if ($startsWith != "") { |
$query->bindParam(":startsWith", $startsWith); | $startsWith = $startsWith . "%"; |
} | $query -> bindParam(":startsWith", $startsWith); |
$query->execute(); | } |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetchAll(); | } |
} | return $query -> fetchAll(); |
} | |
function getNearbyStops($lat, $lng, $limit = "", $distance = 1000) | function getNearbyStops($lat, $lng, $limit = "", $distance = 1000) |
{ | |
if ($lat == null || $lng == null) return Array(); | { |
if ($limit != "") $limitSQL = " LIMIT :limit "; | if ($lat == null || $lng == null) return Array(); |
global $conn; | if ($limit != "") $limitSQL = " LIMIT :limit "; |
$query = "Select *, ST_Distance(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), FALSE) as distance | global $conn; |
$query = "Select *, ST_Distance(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), FALSE) as distance | |
from stops WHERE ST_DWithin(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), :distance, FALSE) | from stops WHERE ST_DWithin(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), :distance, FALSE) |
order by distance $limitSQL;"; | order by distance $limitSQL;"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":distance", $distance); | $query -> bindParam(":distance", $distance); |
$query->bindParam(":limit", $limit); | $query -> bindParam(":limit", $limit); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getStopsByName($name) | |
{ | |
global $conn; | |
$query = "Select * from stops where stop_name LIKE :name;"; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$name = "%" . $name . ";%"; | |
$query -> bindParam(":name", $name); | |
$query -> execute(); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
return $query -> fetchAll(); | |
} | |
function getStopsBySuburb($suburb) | function getStopsBySuburb($suburb) |
{ | |
global $conn; | { |
$query = "Select * from stops where zone_id LIKE :suburb order by stop_name;"; | global $conn; |
debug($query, "database"); | $query = "Select * from stops where zone_id LIKE :suburb order by stop_name;"; |
$query = $conn->prepare($query); | debug($query, "database"); |
$suburb = "%" . $suburb . ";%"; | $query = $conn -> prepare($query); |
$query->bindParam(":suburb", $suburb); | $suburb = "%" . $suburb . ";%"; |
$query->execute(); | $query -> bindParam(":suburb", $suburb); |
if (!$query) { | $query -> execute(); |
databaseError($conn->errorInfo()); | if (!$query) { |
return Array(); | databaseError($conn -> errorInfo()); |
} | return Array(); |
return $query->fetchAll(); | } |
} | return $query -> fetchAll(); |
function getStopsByStopCode($stop_code,$startsWith = "") | } |
{ | function getStopsByStopCode($stop_code, $startsWith = "") |
global $conn; | |
$query = "Select * from stops where (stop_code = :stop_code OR stop_code LIKE :stop_code2)"; | { |
if ($startsWith != "") $query .= " AND stop_name like :startsWith"; | global $conn; |
$query = "Select * from stops where (stop_code = :stop_code OR stop_code LIKE :stop_code2)"; | |
debug($query, "database"); | if ($startsWith != "") $query .= " AND stop_name like :startsWith"; |
$query = $conn->prepare($query); | |
debug($query, "database"); | |
$query->bindParam(":stop_code", $stop_code); | $query = $conn -> prepare($query); |
$stop_code2 = $stop_code . "%"; | |
$query->bindParam(":stop_code2", $stop_code2); | $query -> bindParam(":stop_code", $stop_code); |
if ($startsWith != "") { | $stop_code2 = $stop_code . "%"; |
$startsWith = $startsWith."%"; | $query -> bindParam(":stop_code2", $stop_code2); |
$query->bindParam(":startsWith", $startsWith); | if ($startsWith != "") { |
} | $startsWith = $startsWith . "%"; |
$query->execute(); | $query -> bindParam(":startsWith", $startsWith); |
if (!$query) { | } |
databaseError($conn->errorInfo()); | $query -> execute(); |
return Array(); | if (!$query) { |
} | databaseError($conn -> errorInfo()); |
return $query->fetchAll(); | return Array(); |
} | } |
return $query -> fetchAll(); | |
} | |
function getStopRoutes($stopID, $service_period) | function getStopRoutes($stopID, $service_period) |
{ | |
if ($service_period == "") $service_period = service_period(); | { |
global $conn; | if ($service_period == "") $service_period = service_period(); |
$query = "SELECT distinct service_id,trips.route_id,route_short_name,route_long_name | global $conn; |
$query = "SELECT distinct service_id,trips.route_id,route_short_name,route_long_name | |
FROM stop_times join trips on trips.trip_id = | FROM stop_times join trips on trips.trip_id = |
stop_times.trip_id join routes on trips.route_id = routes.route_id WHERE stop_id = :stopID AND service_id=:service_period"; | stop_times.trip_id join routes on trips.route_id = routes.route_id WHERE stop_id = :stopID AND service_id=:service_period"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":service_period", $service_period); | $query -> bindParam(":service_period", $service_period); |
$query->bindParam(":stopID", $stopID); | $query -> bindParam(":stopID", $stopID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getStopTrips($stopID, $service_period = "", $afterTime = "", $limit = "") | function getStopTrips($stopID, $service_period = "", $afterTime = "", $limit = "") |
{ | |
if ($service_period == "") $service_period = service_period(); | { |
if ($limit != "") $limitSQL = " LIMIT :limit "; | if ($service_period == "") $service_period = service_period(); |
global $conn; | if ($limit != "") $limitSQL = " LIMIT :limit "; |
if ($afterTime != "") { | global $conn; |
$query = " SELECT stop_times.trip_id,stop_times.arrival_time,stop_times.stop_id,stop_sequence,service_id,trips.route_id,route_short_name,route_long_name, end_times.arrival_time as end_time | if ($afterTime != "") { |
$query = " SELECT stop_times.trip_id,stop_times.arrival_time,stop_times.stop_id,stop_sequence,service_id,trips.route_id,route_short_name,route_long_name, end_times.arrival_time as end_time | |
FROM stop_times | FROM stop_times |
join trips on trips.trip_id = | join trips on trips.trip_id = |
stop_times.trip_id | stop_times.trip_id |
join routes on trips.route_id = routes.route_id , (SELECT trip_id,max(arrival_time) as arrival_time from stop_times | join routes on trips.route_id = routes.route_id , (SELECT trip_id,max(arrival_time) as arrival_time from stop_times |
WHERE stop_times.arrival_time IS NOT NULL group by trip_id) as end_times | WHERE stop_times.arrival_time IS NOT NULL group by trip_id) as end_times |
WHERE stop_times.stop_id = :stopID | WHERE stop_times.stop_id = :stopID |
AND stop_times.trip_id = end_times.trip_id | AND stop_times.trip_id = end_times.trip_id |
AND service_id=:service_period | AND service_id=:service_period |
AND end_times.arrival_time > :afterTime | AND end_times.arrival_time > :afterTime |
ORDER BY end_time $limitSQL"; | ORDER BY end_time $limitSQL"; |
} | } |
else { | else { |
$query = "SELECT stop_times.trip_id,arrival_time,stop_times.stop_id,stop_sequence,service_id,trips.route_id,route_short_name,route_long_name | $query = "SELECT stop_times.trip_id,arrival_time,stop_times.stop_id,stop_sequence,service_id,trips.route_id,route_short_name,route_long_name |
FROM stop_times | FROM stop_times |
join trips on trips.trip_id = | join trips on trips.trip_id = |
stop_times.trip_id | stop_times.trip_id |
join routes on trips.route_id = routes.route_id | join routes on trips.route_id = routes.route_id |
WHERE stop_times.stop_id = :stopID | WHERE stop_times.stop_id = :stopID |
AND service_id=:service_period | AND service_id=:service_period |
ORDER BY arrival_time $limitSQL"; | ORDER BY arrival_time $limitSQL"; |
} | } |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":service_period", $service_period); | $query -> bindParam(":service_period", $service_period); |
$query->bindParam(":stopID", $stopID); | $query -> bindParam(":stopID", $stopID); |
if ($limit != "") $query->bindParam(":limit", $limit); | if ($limit != "") $query -> bindParam(":limit", $limit); |
if ($afterTime != "") $query->bindParam(":afterTime", $afterTime); | if ($afterTime != "") $query -> bindParam(":afterTime", $afterTime); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function getStopTripsWithTimes($stopID, $time = "", $service_period = "", $time_range = "", $limit = "") | function getStopTripsWithTimes($stopID, $time = "", $service_period = "", $time_range = "", $limit = "") |
{ | |
if ($service_period == "") $service_period = service_period(); | { |
if ($time_range == "") $time_range = (24 * 60 * 60); | if ($service_period == "") $service_period = service_period(); |
if ($time == "") $time = current_time(); | if ($time_range == "") $time_range = (24 * 60 * 60); |
if ($limit == "") $limit = 10; | if ($time == "") $time = current_time(); |
$trips = getStopTrips($stopID, $service_period, $time); | if ($limit == "") $limit = 10; |
$timedTrips = Array(); | $trips = getStopTrips($stopID, $service_period, $time); |
if ($trips && sizeof($trips) > 0) { | $timedTrips = Array(); |
foreach ($trips as $trip) { | if ($trips && sizeof($trips) > 0) { |
if ($trip['arrival_time'] != "") { | foreach ($trips as $trip) { |
if (strtotime($trip['arrival_time']) > strtotime($time) and strtotime($trip['arrival_time']) < (strtotime($time) + $time_range)) { | if ($trip['arrival_time'] != "") { |
$timedTrips[] = $trip; | if (strtotime($trip['arrival_time']) > strtotime($time) and strtotime($trip['arrival_time']) < (strtotime($time) + $time_range)) { |
} | $timedTrips[] = $trip; |
} | } |
else { | } |
$timedTrip = getTimeInterpolatedTripAtStop($trip['trip_id'], $trip['stop_sequence']); | else { |
if ($timedTrip['arrival_time'] > $time and strtotime($timedTrip['arrival_time']) < (strtotime($time) + $time_range)) { | $timedTrip = getTimeInterpolatedTripAtStop($trip['trip_id'], $trip['stop_sequence']); |
$timedTrips[] = $timedTrip; | if ($timedTrip['arrival_time'] > $time and strtotime($timedTrip['arrival_time']) < (strtotime($time) + $time_range)) { |
} | $timedTrips[] = $timedTrip; |
} | } |
if (sizeof($timedTrips) > $limit) break; | } |
} | if (sizeof($timedTrips) > $limit) break; |
sktimesort($timedTrips, "arrival_time", true); | } |
} | sktimesort($timedTrips, "arrival_time", true); |
return $timedTrips; | } |
} | return $timedTrips; |
} | |
?> | ?> |
<?php | <?php |
function getTrip($tripID) | function getTrip($tripID) |
{ | |
global $conn; | { |
$query = "Select * from trips | global $conn; |
$query = "Select * from trips | |
join routes on trips.route_id = routes.route_id | join routes on trips.route_id = routes.route_id |
where trip_id = :tripID | where trip_id = :tripID |
LIMIT 1"; | LIMIT 1"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetch(PDO::FETCH_ASSOC); | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | } |
function getTripShape($tripID) | function getTripShape($tripID) |
{ | |
global $conn; | { |
$query = "SELECT ST_AsKML(ST_MakeLine(geometry(a.position))) as the_route | global $conn; |
$query = "SELECT ST_AsKML(ST_MakeLine(geometry(a.position))) as the_route | |
FROM (SELECT position, | FROM (SELECT position, |
stop_sequence, trips.trip_id | stop_sequence, trips.trip_id |
FROM stop_times | FROM stop_times |
join trips on trips.trip_id = stop_times.trip_id | join trips on trips.trip_id = stop_times.trip_id |
join stops on stops.stop_id = stop_times.stop_id | join stops on stops.stop_id = stop_times.stop_id |
WHERE trips.trip_id = :tripID ORDER BY stop_sequence) as a group by a.trip_id"; | WHERE trips.trip_id = :tripID ORDER BY stop_sequence) as a group by a.trip_id"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchColumn(0); | return $query -> fetchColumn(0); |
} | } |
function getTimeInterpolatedTrip($tripID, $range = "") | function getTimeInterpolatedTrip($tripID, $range = "") |
{ | |
global $conn; | { |
$query = "SELECT stop_times.trip_id,arrival_time,stop_times.stop_id,stop_lat,stop_lon,stop_name,stop_code, | global $conn; |
$query = "SELECT stop_times.trip_id,arrival_time,stop_times.stop_id,stop_lat,stop_lon,stop_name,stop_code, | |
stop_sequence,service_id,trips.route_id,route_short_name,route_long_name | stop_sequence,service_id,trips.route_id,route_short_name,route_long_name |
FROM stop_times | FROM stop_times |
join trips on trips.trip_id = stop_times.trip_id | join trips on trips.trip_id = stop_times.trip_id |
join routes on trips.route_id = routes.route_id | join routes on trips.route_id = routes.route_id |
join stops on stops.stop_id = stop_times.stop_id | join stops on stops.stop_id = stop_times.stop_id |
WHERE trips.trip_id = :tripID $range ORDER BY stop_sequence"; | WHERE trips.trip_id = :tripID $range ORDER BY stop_sequence"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
$stopTimes = $query->fetchAll(); | $stopTimes = $query -> fetchAll(); |
$cur_timepoint = Array(); | $cur_timepoint = Array(); |
$next_timepoint = Array(); | $next_timepoint = Array(); |
$distance_between_timepoints = 0.0; | $distance_between_timepoints = 0.0; |
$distance_traveled_between_timepoints = 0.0; | $distance_traveled_between_timepoints = 0.0; |
$rv = Array(); | $rv = Array(); |
foreach ($stopTimes as $i => $stopTime) { | foreach ($stopTimes as $i => $stopTime) { |
if ($stopTime['arrival_time'] != "") { | if ($stopTime['arrival_time'] != "") { |
// is timepoint | // is timepoint |
$cur_timepoint = $stopTime; | $cur_timepoint = $stopTime; |
$distance_between_timepoints = 0.0; | $distance_between_timepoints = 0.0; |
$distance_traveled_between_timepoints = 0.0; | $distance_traveled_between_timepoints = 0.0; |
if ($i + 1 < sizeof($stopTimes)) { | if ($i + 1 < sizeof($stopTimes)) { |
$k = $i + 1; | $k = $i + 1; |
$distance_between_timepoints+= distance($stopTimes[$k - 1]["stop_lat"], $stopTimes[$k - 1]["stop_lon"], $stopTimes[$k]["stop_lat"], $stopTimes[$k]["stop_lon"]); | $distance_between_timepoints += distance($stopTimes[$k - 1]["stop_lat"], $stopTimes[$k - 1]["stop_lon"], $stopTimes[$k]["stop_lat"], $stopTimes[$k]["stop_lon"]); |
while ($stopTimes[$k]["arrival_time"] == "" && $k + 1 < sizeof($stopTimes)) { | while ($stopTimes[$k]["arrival_time"] == "" && $k + 1 < sizeof($stopTimes)) { |
$k+= 1; | $k += 1; |
//echo "k".$k; | // echo "k".$k; |
$distance_between_timepoints+= distance($stopTimes[$k - 1]["stop_lat"], $stopTimes[$k - 1]["stop_lon"], $stopTimes[$k]["stop_lat"], $stopTimes[$k]["stop_lon"]); | $distance_between_timepoints += distance($stopTimes[$k - 1]["stop_lat"], $stopTimes[$k - 1]["stop_lon"], $stopTimes[$k]["stop_lat"], $stopTimes[$k]["stop_lon"]); |
} | } |
$next_timepoint = $stopTimes[$k]; | $next_timepoint = $stopTimes[$k]; |
} | } |
$rv[] = $stopTime; | $rv[] = $stopTime; |
} | } |
else { | else { |
// is untimed point | // is untimed point |
//echo "i".$i; | // echo "i".$i; |
$distance_traveled_between_timepoints+= distance($stopTimes[$i - 1]["stop_lat"], $stopTimes[$i - 1]["stop_lon"], $stopTimes[$i]["stop_lat"], $stopTimes[$i]["stop_lon"]); | $distance_traveled_between_timepoints += distance($stopTimes[$i - 1]["stop_lat"], $stopTimes[$i - 1]["stop_lon"], $stopTimes[$i]["stop_lat"], $stopTimes[$i]["stop_lon"]); |
//echo "$distance_traveled_between_timepoints / $distance_between_timepoints<br>"; | // echo "$distance_traveled_between_timepoints / $distance_between_timepoints<br>"; |
$distance_percent = $distance_traveled_between_timepoints / $distance_between_timepoints; | $distance_percent = $distance_traveled_between_timepoints / $distance_between_timepoints; |
if ($next_timepoint["arrival_time"] != "") { | if ($next_timepoint["arrival_time"] != "") { |
$total_time = strtotime($next_timepoint["arrival_time"]) - strtotime($cur_timepoint["arrival_time"]); | $total_time = strtotime($next_timepoint["arrival_time"]) - strtotime($cur_timepoint["arrival_time"]); |
//echo strtotime($next_timepoint["arrival_time"])." - ".strtotime($cur_timepoint["arrival_time"])."<br>"; | // echo strtotime($next_timepoint["arrival_time"])." - ".strtotime($cur_timepoint["arrival_time"])."<br>"; |
$time_estimate = ($distance_percent * $total_time) + strtotime($cur_timepoint["arrival_time"]); | $time_estimate = ($distance_percent * $total_time) + strtotime($cur_timepoint["arrival_time"]); |
$stopTime["arrival_time"] = date("H:i:s", $time_estimate); | $stopTime["arrival_time"] = date("H:i:s", $time_estimate); |
} | } |
else { | else { |
$stopTime["arrival_time"] = $cur_timepoint["arrival_time"]; | $stopTime["arrival_time"] = $cur_timepoint["arrival_time"]; |
} | } |
$rv[] = $stopTime; | $rv[] = $stopTime; |
} | } |
} | } |
//var_dump($rv); | // var_dump($rv); |
return $rv; | return $rv; |
} | } |
function getTripPreviousTimePoint($tripID, $stop_sequence) | function getTripPreviousTimePoint($tripID, $stop_sequence) |
{ | |
global $conn; | { |
$query = " SELECT trip_id,stop_id, | global $conn; |
$query = " SELECT trip_id,stop_id, | |
stop_sequence | stop_sequence |
FROM stop_times | FROM stop_times |
WHERE trip_id = :tripID and stop_sequence < :stop_sequence | WHERE trip_id = :tripID and stop_sequence < :stop_sequence |
and stop_times.arrival_time IS NOT NULL ORDER BY stop_sequence DESC LIMIT 1"; | and stop_times.arrival_time IS NOT NULL ORDER BY stop_sequence DESC LIMIT 1"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->bindParam(":stop_sequence", $stop_sequence); | $query -> bindParam(":stop_sequence", $stop_sequence); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetch(PDO::FETCH_ASSOC); | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | } |
function getTripNextTimePoint($tripID, $stop_sequence) | function getTripNextTimePoint($tripID, $stop_sequence) |
{ | |
global $conn; | { |
$query = " SELECT trip_id,stop_id, | global $conn; |
$query = " SELECT trip_id,stop_id, | |
stop_sequence | stop_sequence |
FROM stop_times | FROM stop_times |
WHERE trip_id = :tripID and stop_sequence > :stop_sequence | WHERE trip_id = :tripID and stop_sequence > :stop_sequence |
and stop_times.arrival_time IS NOT NULL ORDER BY stop_sequence LIMIT 1"; | and stop_times.arrival_time IS NOT NULL ORDER BY stop_sequence LIMIT 1"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->bindParam(":stop_sequence", $stop_sequence); | $query -> bindParam(":stop_sequence", $stop_sequence); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetch(PDO::FETCH_ASSOC); | return $query -> fetch(PDO :: FETCH_ASSOC); |
} | } |
function getTimeInterpolatedTripAtStop($tripID, $stop_sequence) | function getTimeInterpolatedTripAtStop($tripID, $stop_sequence) |
{ | |
global $conn; | { |
// limit interpolation to between nearest actual points. | global $conn; |
$prevTimePoint = getTripPreviousTimePoint($tripID, $stop_sequence); | // limit interpolation to between nearest actual points. |
$nextTimePoint = getTripNextTimePoint($tripID, $stop_sequence); | $prevTimePoint = getTripPreviousTimePoint($tripID, $stop_sequence); |
//echo " prev {$lowestDelta['stop_sequence']} next {$nextTimePoint['stop_sequence']} "; | $nextTimePoint = getTripNextTimePoint($tripID, $stop_sequence); |
$range = ""; | // echo " prev {$lowestDelta['stop_sequence']} next {$nextTimePoint['stop_sequence']} "; |
if ($prevTimePoint != "") $range .= " AND stop_sequence >= '{$prevTimePoint['stop_sequence']}'"; | $range = ""; |
if ($nextTimePoint != "") $range .= " AND stop_sequence <= '{$nextTimePoint['stop_sequence']}'"; | if ($prevTimePoint != "") $range .= " AND stop_sequence >= '{$prevTimePoint['stop_sequence']}'"; |
foreach (getTimeInterpolatedTrip($tripID, $range) as $tripStop) { | if ($nextTimePoint != "") $range .= " AND stop_sequence <= '{$nextTimePoint['stop_sequence']}'"; |
if ($tripStop['stop_sequence'] == $stop_sequence) return $tripStop; | foreach (getTimeInterpolatedTrip($tripID, $range) as $tripStop) { |
} | if ($tripStop['stop_sequence'] == $stop_sequence) return $tripStop; |
return Array(); | } |
} | return Array(); |
} | |
function getTripStartTime($tripID) | function getTripStartTime($tripID) |
{ | |
global $conn; | { |
$query = "Select * from stop_times | global $conn; |
$query = "Select * from stop_times | |
where trip_id = :tripID | where trip_id = :tripID |
AND arrival_time IS NOT NULL | AND arrival_time IS NOT NULL |
AND stop_sequence = '1'"; | AND stop_sequence = '1'"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
$r = $query->fetch(PDO::FETCH_ASSOC); | $r = $query -> fetch(PDO :: FETCH_ASSOC); |
return $r['arrival_time']; | return $r['arrival_time']; |
} | } |
function getTripEndTime($tripID) | |
{ | |
global $conn; | |
$query = "SELECT trip_id,max(arrival_time) as arrival_time from stop_times | |
WHERE stop_times.arrival_time IS NOT NULL and trip_id = :tripID group by trip_id"; | |
debug($query, "database"); | |
$query = $conn -> prepare($query); | |
$query -> bindParam(":tripID", $tripID); | |
$query -> execute(); | |
if (!$query) { | |
databaseError($conn -> errorInfo()); | |
return Array(); | |
} | |
$r = $query -> fetch(PDO :: FETCH_ASSOC); | |
return $r['arrival_time']; | |
} | |
function getActiveTrips($time) | function getActiveTrips($time) |
{ | |
global $conn; | { |
if ($time == "") $time = current_time(); | global $conn; |
$query = "Select distinct stop_times.trip_id, start_times.arrival_time as start_time, end_times.arrival_time as end_time from stop_times, (SELECT trip_id,arrival_time from stop_times WHERE stop_times.arrival_time IS NOT NULL | if ($time == "") $time = current_time(); |
$query = "Select distinct stop_times.trip_id, start_times.arrival_time as start_time, end_times.arrival_time as end_time from stop_times, (SELECT trip_id,arrival_time from stop_times WHERE stop_times.arrival_time IS NOT NULL | |
AND stop_sequence = '1') as start_times, (SELECT trip_id,max(arrival_time) as arrival_time from stop_times WHERE stop_times.arrival_time IS NOT NULL group by trip_id) as end_times | AND stop_sequence = '1') as start_times, (SELECT trip_id,max(arrival_time) as arrival_time from stop_times WHERE stop_times.arrival_time IS NOT NULL group by trip_id) as end_times |
WHERE start_times.trip_id = end_times.trip_id AND stop_times.trip_id = end_times.trip_id AND :time > start_times.arrival_time AND :time < end_times.arrival_time"; | WHERE start_times.trip_id = end_times.trip_id AND stop_times.trip_id = end_times.trip_id AND :time > start_times.arrival_time AND :time < end_times.arrival_time"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
$query->bindParam(":time", $time); | $query -> bindParam(":time", $time); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function viaPoints($tripID, $stop_sequence = "") | function viaPoints($tripID, $stop_sequence = "", $timing_points_only = true) |
{ | |
global $conn; | { |
$query = "SELECT stops.stop_id, stop_name, arrival_time | global $conn; |
$query = "SELECT stops.stop_id, stop_name, arrival_time | |
FROM stop_times join stops on stops.stop_id = stop_times.stop_id | FROM stop_times join stops on stops.stop_id = stop_times.stop_id |
WHERE stop_times.trip_id = :tripID | WHERE stop_times.trip_id = :tripID |
" . ($stop_sequence != "" ? " AND stop_sequence > :stop_sequence " : "") . "AND substr(stop_code,1,2) != 'Wj' ORDER BY stop_sequence"; | " . ($stop_sequence != "" ? " AND stop_sequence > :stop_sequence " : "") . ($timing_points_only ? "AND substr(stop_code,1,2) != 'Wj' ": ""). " ORDER BY stop_sequence"; |
debug($query, "database"); | debug($query, "database"); |
$query = $conn->prepare($query); | $query = $conn -> prepare($query); |
if ($stop_sequence != "") $query->bindParam(":stop_sequence", $stop_sequence); | if ($stop_sequence != "") $query -> bindParam(":stop_sequence", $stop_sequence); |
$query->bindParam(":tripID", $tripID); | $query -> bindParam(":tripID", $tripID); |
$query->execute(); | $query -> execute(); |
if (!$query) { | if (!$query) { |
databaseError($conn->errorInfo()); | databaseError($conn -> errorInfo()); |
return Array(); | return Array(); |
} | } |
return $query->fetchAll(); | return $query -> fetchAll(); |
} | } |
function viaPointNames($tripid, $stop_sequence = "") | function viaPointNames($tripid, $stop_sequence = "") |
{ | |
$viaPointNames = Array(); | { |
foreach (viaPoints($tripid, $stop_sequence) as $point) { | $viaPointNames = Array(); |
$viaPointNames[] = $point['stop_name']; | foreach (viaPoints($tripid, $stop_sequence) as $point) { |
} | $viaPointNames[] = $point['stop_name']; |
if (sizeof($viaPointNames) > 0) { | } |
return r_implode(", ", $viaPointNames); | if (sizeof($viaPointNames) > 0) { |
} | return r_implode(", ", $viaPointNames); |
else { | } |
return ""; | else { |
} | return ""; |
} | } |
} | |
?> | ?> |
<?php | <?php |
include ('include/common.inc.php'); | include ('include/common.inc.php'); |
include_header("bus.lambdacomplex.org", "index", false) | include_header("bus.lambdacomplex.org", "index", false) |
?> | ?> |
<div data-role="page"> | <div data-role="page"> |
<div data-role="content"> | <div data-role="content"> |
<div id="jqm-homeheader"> | <div id="jqm-homeheader"> |
<h1>busness time</h1><br><small>Canberra Bus Timetables and Trip Planner</small> | <h1>busness time</h1><br><small>Canberra Bus Timetables and Trip Planner</small> |
</div> | </div> |
<a name="maincontent" id="maincontent"></a> | <a name="maincontent" id="maincontent"></a> |
<a href="tripPlanner.php" data-role="button" data-icon="navigation">Launch Trip Planner...</a> | <a href="tripPlanner.php" data-role="button" data-icon="navigation">Launch Trip Planner...</a> |
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> | <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> |
<li data-role="list-divider">Timetables - Stops</li> | <li data-role="list-divider">Timetables - Stops</li> |
<li><a href="stopList.php">Major (Timing Point) Stops</a></li> | <li><a href="stopList.php">Major (Timing Point) Stops</a></li> |
<li><a href="stopList.php?allstops=yes">All Stops</a></li> | <li><a href="stopList.php?allstops=yes">All Stops</a></li> |
<li><a href="stopList.php?bysuburbs=yes">Stops By Suburb</a></li> | <li><a href="stopList.php?bysuburbs=yes">Stops By Suburb</a></li> |
<li><a class="nearby" href="stopList.php?nearby=yes">Nearby Stops</a></li> | <li><a class="nearby" href="stopList.php?nearby=yes">Nearby Stops</a></li> |
</ul> | </ul> |
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> | <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> |
<li data-role="list-divider">Timetables - Routes</li> | <li data-role="list-divider">Timetables - Routes</li> |
<li><a href="routeList.php">Routes By Final Destination</a></li> | <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?bynumber=yes">Routes By Number</a></li> |
<li><a href="routeList.php?bysuburbs=yes">Routes By Suburb</a></li> | <li><a href="routeList.php?bysuburbs=yes">Routes By Suburb</a></li> |
<li><a class="nearby" href="routeList.php?nearby=yes">Nearby Routes</a></li> | <li><a class="nearby" href="routeList.php?nearby=yes">Nearby Routes</a></li> |
</ul> | </ul> |
<?php | <?php |
echo timePlaceSettings(); | |
echo ' <a href="labs/index.php" data-role="button" data-icon="beaker">Busness R&D</a>'; | echo ' <a href="labs/index.php" data-role="button" data-icon="beaker">Busness R&D</a>'; |
include_footer(true) | include_footer(true) |
?> | ?> |
/*! LAB.js (LABjs :: Loading And Blocking JavaScript) | |
v2.0.1 (c) Kyle Simpson | |
MIT License | |
*/ | |
(function(o){var K=o.$LAB,y="UseLocalXHR",z="AlwaysPreserveOrder",u="AllowDuplicates",A="CacheBust",B="BasePath",C=/^[^?#]*\//.exec(location.href)[0],D=/^\w+\:\/\/\/?[^\/]+/.exec(C)[0],i=document.head||document.getElementsByTagName("head"),L=(o.opera&&Object.prototype.toString.call(o.opera)=="[object Opera]")||("MozAppearance"in document.documentElement.style),q=document.createElement("script"),E=typeof q.preload=="boolean",r=E||(q.readyState&&q.readyState=="uninitialized"),F=!r&&q.async===true,M=!r&&!F&&!L;function G(a){return Object.prototype.toString.call(a)=="[object Function]"}function H(a){return Object.prototype.toString.call(a)=="[object Array]"}function N(a,c){var b=/^\w+\:\/\//;if(/^\/\/\/?/.test(a)){a=location.protocol+a}else if(!b.test(a)&&a.charAt(0)!="/"){a=(c||"")+a}return b.test(a)?a:((a.charAt(0)=="/"?D:C)+a)}function s(a,c){for(var b in a){if(a.hasOwnProperty(b)){c[b]=a[b]}}return c}function O(a){var c=false;for(var b=0;b<a.scripts.length;b++){if(a.scripts[b].ready&&a.scripts[b].exec_trigger){c=true;a.scripts[b].exec_trigger();a.scripts[b].exec_trigger=null}}return c}function t(a,c,b,d){a.onload=a.onreadystatechange=function(){if((a.readyState&&a.readyState!="complete"&&a.readyState!="loaded")||c[b])return;a.onload=a.onreadystatechange=null;d()}}function I(a){a.ready=a.finished=true;for(var c=0;c<a.finished_listeners.length;c++){setTimeout(a.finished_listeners[c],0)}a.ready_listeners=[];a.finished_listeners=[]}function P(d,f,e,g,h){setTimeout(function(){var a,c=f.real_src,b;if("item"in i){if(!i[0]){setTimeout(arguments.callee,25);return}i=i[0]}a=document.createElement("script");if(f.type)a.type=f.type;if(f.charset)a.charset=f.charset;if(h){if(r){e.elem=a;if(E){a.preload=true;a.onpreload=g}else{a.onreadystatechange=function(){if(a.readyState=="loaded")g();a.onreadystatechange=null}}a.src=c}else if(h&&c.indexOf(D)==0&&d[y]){b=new XMLHttpRequest();b.onreadystatechange=function(){if(b.readyState==4){b.onreadystatechange=function(){};e.text=b.responseText+"\n//@ sourceURL="+c;g()}};b.open("GET",c);b.send()}else{a.type="text/cache-script";t(a,e,"ready",function(){i.removeChild(a);g()});a.src=c;i.insertBefore(a,i.firstChild)}}else if(F){a.async=false;t(a,e,"finished",g);a.src=c;i.insertBefore(a,i.firstChild)}else{t(a,e,"finished",g);a.src=c;i.insertBefore(a,i.firstChild)}},0)}function J(){var l={},Q=r||M,n=[],p={},m;l[y]=true;l[z]=false;l[u]=false;l[A]=false;l[B]="";function R(a,c,b){var d;function f(){if(d!=null){I(b);d=null}}if(p[c.src].finished)return;if(!a[u])p[c.src].finished=true;d=b.elem||document.createElement("script");if(c.type)d.type=c.type;if(c.charset)d.charset=c.charset;t(d,b,"finished",f);if(b.elem){b.elem=null}else if(b.text){d.onload=d.onreadystatechange=null;d.text=b.text}else{d.src=c.real_src}i.insertBefore(d,i.firstChild);if(b.text){f()}}function S(c,b,d,f){var e,g,h=function(){b.ready_cb(b,function(){R(c,b,e)})},j=function(){b.finished_cb(b,d)};b.src=N(b.src,c[B]);b.real_src=b.src+(c[A]?((/\?.*$/.test(b.src)?"&_":"?_")+~~(Math.random()*1E9)+"="):"");if(!p[b.src])p[b.src]={items:[],finished:false};g=p[b.src].items;if(c[u]||g.length==0){e=g[g.length]={ready:false,finished:false,ready_listeners:[h],finished_listeners:[j]};P(c,b,e,((f)?function(){e.ready=true;for(var a=0;a<e.ready_listeners.length;a++){setTimeout(e.ready_listeners[a],0)}e.ready_listeners=[]}:function(){I(e)}),f)}else{e=g[0];if(e.finished){setTimeout(j,0)}else{e.finished_listeners.push(j)}}}function v(){var e,g=s(l,{}),h=[],j=0,w=false,k;function T(a,c){a.ready=true;a.exec_trigger=c;x()}function U(a,c){a.ready=a.finished=true;a.exec_trigger=null;for(var b=0;b<c.scripts.length;b++){if(!c.scripts[b].finished)return}c.finished=true;x()}function x(){while(j<h.length){if(G(h[j])){try{h[j]()}catch(err){}}else if(!h[j].finished){if(O(h[j]))continue;break}j++}if(j==h.length){w=false;k=false}}function V(){if(!k||!k.scripts){h.push(k={scripts:[],finished:true})}}e={script:function(){for(var f=0;f<arguments.length;f++){(function(a,c){var b;if(!H(a)){c=[a]}for(var d=0;d<c.length;d++){V();a=c[d];if(G(a))a=a();if(!a)continue;if(H(a)){b=[].slice.call(a);b.push(d,1);c.splice.call(c,b);d--;continue}if(typeof a=="string")a={src:a};a=s(a,{ready:false,ready_cb:T,finished:false,finished_cb:U});k.finished=false;k.scripts.push(a);S(g,a,k,(Q&&w));w=true;if(g[z])e.wait()}})(arguments[f],arguments[f])}return e},wait:function(){if(arguments.length>0){for(var a=0;a<arguments.length;a++){h.push(arguments[a])}k=h[h.length-1]}else k=false;x();return e}};return{script:e.script,wait:e.wait,setOptions:function(a){s(a,g);return e}}}m={setGlobalDefaults:function(a){s(a,l);return m},setOptions:function(){return v().setOptions.apply(null,arguments)},script:function(){return v().script.apply(null,arguments)},wait:function(){return v().wait.apply(null,arguments)},queueScript:function(){n[n.length]={type:"script",args:[].slice.call(arguments)};return m},queueWait:function(){n[n.length]={type:"wait",args:[].slice.call(arguments)};return m},runQueue:function(){var a=m,c=n.length,b=c,d;for(;--b>=0;){d=n.shift();a=a[d.type].apply(null,d.args)}return a},noConflict:function(){o.$LAB=K;return m},sandbox:function(){return J()}};return m}o.$LAB=J();(function(a,c,b){if(document.readyState==null&&document[a]){document.readyState="loading";document[a](c,b=function(){document.removeEventListener(c,b,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this); |
//Flotr 0.2.0-alpha Copyright (c) 2009 Bas Wenneker, <http://solutoire.com>, MIT License. | |
var Flotr={version:"0.2.0-alpha",author:"Bas Wenneker",website:"http://www.solutoire.com",_registeredTypes:{lines:"drawSeriesLines",points:"drawSeriesPoints",bars:"drawSeriesBars",candles:"drawSeriesCandles",pie:"drawSeriesPie"},register:function(A,B){Flotr._registeredTypes[A]=B+""},draw:function(B,D,A,C){C=C||Flotr.Graph;return new C(B,D,A)},getSeries:function(A){return A.collect(function(C){var B,C=(C.data)?Object.clone(C):{data:C};for(B=C.data.length-1;B>-1;--B){C.data[B][1]=(C.data[B][1]===null?null:parseFloat(C.data[B][1]))}return C})},merge:function(D,B){var A=B||{};for(var C in D){A[C]=(D[C]!=null&&typeof (D[C])=="object"&&!(D[C].constructor==Array||D[C].constructor==RegExp)&&!Object.isElement(D[C]))?Flotr.merge(D[C],B[C]):A[C]=D[C]}return A},getTickSize:function(E,D,A,B){var H=(A-D)/E;var G=Flotr.getMagnitude(H);var C=H/G;var F=10;if(C<1.5){F=1}else{if(C<2.25){F=2}else{if(C<3){F=((B==0)?2:2.5)}else{if(C<7.5){F=5}}}}return F*G},defaultTickFormatter:function(A){return A+""},defaultTrackFormatter:function(A){return"("+A.x+", "+A.y+")"},defaultPieLabelFormatter:function(A){return(A.fraction*100).toFixed(2)+"%"},getMagnitude:function(A){return Math.pow(10,Math.floor(Math.log(A)/Math.LN10))},toPixel:function(A){return Math.floor(A)+0.5},toRad:function(A){return -A*(Math.PI/180)},parseColor:function(D){if(D instanceof Flotr.Color){return D}var A,C=Flotr.Color;if((A=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(D))){return new C(parseInt(A[1]),parseInt(A[2]),parseInt(A[3]))}if((A=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(D))){return new C(parseInt(A[1]),parseInt(A[2]),parseInt(A[3]),parseFloat(A[4]))}if((A=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(D))){return new C(parseFloat(A[1])*2.55,parseFloat(A[2])*2.55,parseFloat(A[3])*2.55)}if((A=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(D))){return new C(parseFloat(A[1])*2.55,parseFloat(A[2])*2.55,parseFloat(A[3])*2.55,parseFloat(A[4]))}if((A=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(D))){return new C(parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16))}if((A=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(D))){return new C(parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16))}var B=D.strip().toLowerCase();if(B=="transparent"){return new C(255,255,255,0)}return((A=C.lookupColors[B]))?new C(A[0],A[1],A[2]):false},extractColor:function(B){var A;do{A=B.getStyle("background-color").toLowerCase();if(!(A==""||A=="transparent")){break}B=B.up(0)}while(!B.nodeName.match(/^body$/i));return(A=="rgba(0, 0, 0, 0)")?"transparent":A}};Flotr.Graph=Class.create({initialize:function(B,C,A){this.el=$(B);if(!this.el){throw"The target container doesn't exist"}this.data=C;this.series=Flotr.getSeries(C);this.setOptions(A);this.lastMousePos={pageX:null,pageY:null};this.selection={first:{x:-1,y:-1},second:{x:-1,y:-1}};this.prevSelection=null;this.selectionInterval=null;this.ignoreClick=false;this.prevHit=null;this.constructCanvas();this.initEvents();this.findDataRanges();this.calculateTicks(this.axes.x);this.calculateTicks(this.axes.x2);this.calculateTicks(this.axes.y);this.calculateTicks(this.axes.y2);this.calculateSpacing();this.draw();this.insertLegend();if(this.options.spreadsheet.show){this.constructTabs()}},setOptions:function(B){var P={colors:["#00A8F0","#C0D800","#CB4B4B","#4DA74D","#9440ED"],title:null,subtitle:null,legend:{show:true,noColumns:1,labelFormatter:Prototype.K,labelBoxBorderColor:"#CCCCCC",labelBoxWidth:14,labelBoxHeight:10,labelBoxMargin:5,container:null,position:"nw",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{ticks:null,showLabels:true,labelsAngle:0,title:null,titleAngle:0,noTicks:5,tickFormatter:Flotr.defaultTickFormatter,tickDecimals:null,min:null,max:null,autoscaleMargin:0,color:null},x2axis:{},yaxis:{ticks:null,showLabels:true,labelsAngle:0,title:null,titleAngle:90,noTicks:5,tickFormatter:Flotr.defaultTickFormatter,tickDecimals:null,min:null,max:null,autoscaleMargin:0,color:null},y2axis:{titleAngle:270},points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#FFFFFF",fillOpacity:0.4},lines:{show:false,lineWidth:2,fill:false,fillColor:null,fillOpacity:0.4},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,fillOpacity:0.4,horizontal:false,stacked:false},candles:{show:false,lineWidth:1,wickLineWidth:1,candleWidth:0.6,fill:true,upFillColor:"#00A8F0",downFillColor:"#CB4B4B",fillOpacity:0.5,barcharts:false},pie:{show:false,lineWidth:1,fill:true,fillColor:null,fillOpacity:0.6,explode:6,sizeRatio:0.6,startAngle:Math.PI/4,labelFormatter:Flotr.defaultPieLabelFormatter,pie3D:false,pie3DviewAngle:(Math.PI/2*0.8),pie3DspliceThickness:20},grid:{color:"#545454",backgroundColor:null,tickColor:"#DDDDDD",labelMargin:3,verticalLines:true,horizontalLines:true,outlineWidth:2},selection:{mode:null,color:"#B6D9FF",fps:20},mouse:{track:false,position:"se",relative:false,trackFormatter:Flotr.defaultTrackFormatter,margin:5,lineColor:"#FF3F19",trackDecimals:1,sensibility:2,radius:3},shadowSize:4,defaultType:"lines",HtmlText:true,fontSize:7.5,spreadsheet:{show:false,tabGraphLabel:"Graph",tabDataLabel:"Data",toolbarDownload:"Download CSV",toolbarSelectAll:"Select all"}};P.x2axis=Object.extend(Object.clone(P.xaxis),P.x2axis);P.y2axis=Object.extend(Object.clone(P.yaxis),P.y2axis);this.options=Flotr.merge((B||{}),P);this.axes={x:{options:this.options.xaxis,n:1},x2:{options:this.options.x2axis,n:2},y:{options:this.options.yaxis,n:1},y2:{options:this.options.y2axis,n:2}};var H=[],C=[],K=this.series.length,N=this.series.length,D=this.options.colors,A=[],G=0,M,J,I,O,E;for(J=N-1;J>-1;--J){M=this.series[J].color;if(M!=null){--N;if(Object.isNumber(M)){H.push(M)}else{A.push(Flotr.parseColor(M))}}}for(J=H.length-1;J>-1;--J){N=Math.max(N,H[J]+1)}for(J=0;C.length<N;){M=(D.length==J)?new Flotr.Color(100,100,100):Flotr.parseColor(D[J]);var F=G%2==1?-1:1;var L=1+F*Math.ceil(G/2)*0.2;M.scale(L,L,L);C.push(M);if(++J>=D.length){J=0;++G}}for(J=0,I=0;J<K;++J){O=this.series[J];if(O.color==null){O.color=C[I++].toString()}else{if(Object.isNumber(O.color)){O.color=C[O.color].toString()}}if(!O.xaxis){O.xaxis=this.axes.x}if(O.xaxis==1){O.xaxis=this.axes.x}else{if(O.xaxis==2){O.xaxis=this.axes.x2}}if(!O.yaxis){O.yaxis=this.axes.y}if(O.yaxis==1){O.yaxis=this.axes.y}else{if(O.yaxis==2){O.yaxis=this.axes.y2}}O.lines=Object.extend(Object.clone(this.options.lines),O.lines);O.points=Object.extend(Object.clone(this.options.points),O.points);O.bars=Object.extend(Object.clone(this.options.bars),O.bars);O.candles=Object.extend(Object.clone(this.options.candles),O.candles);O.pie=Object.extend(Object.clone(this.options.pie),O.pie);O.mouse=Object.extend(Object.clone(this.options.mouse),O.mouse);if(O.shadowSize==null){O.shadowSize=this.options.shadowSize}}},constructCanvas:function(){var C=this.el,B,D,A;this.canvas=C.select(".flotr-canvas")[0];this.overlay=C.select(".flotr-overlay")[0];C.childElements().invoke("remove");C.setStyle({position:"relative",cursor:"default"});this.canvasWidth=C.getWidth();this.canvasHeight=C.getHeight();B={width:this.canvasWidth,height:this.canvasHeight};if(this.canvasWidth<=0||this.canvasHeight<=0){throw"Invalid dimensions for plot, width = "+this.canvasWidth+", height = "+this.canvasHeight}if(!this.canvas){D=this.canvas=new Element("canvas",B);D.className="flotr-canvas";D=D.writeAttribute("style","position:absolute;left:0px;top:0px;")}else{D=this.canvas.writeAttribute(B)}C.insert(D);if(Prototype.Browser.IE){D=window.G_vmlCanvasManager.initElement(D)}this.ctx=D.getContext("2d");if(!this.overlay){A=this.overlay=new Element("canvas",B);A.className="flotr-overlay";A=A.writeAttribute("style","position:absolute;left:0px;top:0px;")}else{A=this.overlay.writeAttribute(B)}C.insert(A);if(Prototype.Browser.IE){A=window.G_vmlCanvasManager.initElement(A)}this.octx=A.getContext("2d");if(window.CanvasText){CanvasText.enable(this.ctx);CanvasText.enable(this.octx);this.textEnabled=true}},getTextDimensions:function(F,C,B,D){if(!F){return{width:0,height:0}}if(!this.options.HtmlText&&this.textEnabled){var E=this.ctx.getTextBounds(F,C);return{width:E.width+2,height:E.height+6}}else{var A=this.el.insert('<div style="position:absolute;top:-10000px;'+B+'" class="'+D+' flotr-dummy-div">'+F+"</div>").select(".flotr-dummy-div")[0];dim=A.getDimensions();A.remove();return dim}},loadDataGrid:function(){if(this.seriesData){return this.seriesData}var A=this.series;var B=[];for(i=0;i<A.length;++i){A[i].data.each(function(D){var C=D[0],F=D[1];if(r=B.find(function(G){return G[0]==C})){r[i+1]=F}else{var E=[];E[0]=C;E[i+1]=F;B.push(E)}})}B=B.sortBy(function(C){return C[0]});return this.seriesData=B},showTab:function(B,C){var A="canvas, .flotr-labels, .flotr-legend, .flotr-legend-bg, .flotr-title, .flotr-subtitle";switch(B){case"graph":this.datagrid.up().hide();this.el.select(A).invoke("show");this.tabs.data.removeClassName("selected");this.tabs.graph.addClassName("selected");break;case"data":this.constructDataGrid();this.datagrid.up().show();this.el.select(A).invoke("hide");this.tabs.data.addClassName("selected");this.tabs.graph.removeClassName("selected");break}},constructTabs:function(){var A=new Element("div",{className:"flotr-tabs-group",style:"position:absolute;left:0px;top:"+this.canvasHeight+"px;width:"+this.canvasWidth+"px;"});this.el.insert({bottom:A});this.tabs={graph:new Element("div",{className:"flotr-tab selected",style:"float:left;"}).update(this.options.spreadsheet.tabGraphLabel),data:new Element("div",{className:"flotr-tab",style:"float:left;"}).update(this.options.spreadsheet.tabDataLabel)};A.insert(this.tabs.graph).insert(this.tabs.data);this.el.setStyle({height:this.canvasHeight+this.tabs.data.getHeight()+2+"px"});this.tabs.graph.observe("click",(function(){this.showTab("graph")}).bind(this));this.tabs.data.observe("click",(function(){this.showTab("data")}).bind(this))},constructDataGrid:function(){if(this.datagrid){return this.datagrid}var D,B,L=this.series,J=this.loadDataGrid();var K=this.datagrid=new Element("table",{className:"flotr-datagrid",style:"height:100px;"});var C=["<colgroup><col />"];var F=['<tr class="first-row">'];F.push("<th> </th>");for(D=0;D<L.length;++D){F.push('<th scope="col">'+(L[D].label||String.fromCharCode(65+D))+"</th>");C.push("<col />")}F.push("</tr>");for(B=0;B<J.length;++B){F.push("<tr>");for(D=0;D<L.length+1;++D){var M="td";var G=(J[B][D]!=null?Math.round(J[B][D]*100000)/100000:"");if(D==0){M="th";var I;if(this.options.xaxis.ticks){var E=this.options.xaxis.ticks.find(function(N){return N[0]==J[B][D]});if(E){I=E[1]}}else{I=this.options.xaxis.tickFormatter(G)}if(I){G=I}}F.push("<"+M+(M=="th"?' scope="row"':"")+">"+G+"</"+M+">")}F.push("</tr>")}C.push("</colgroup>");K.update(C.join("")+F.join(""));if(!Prototype.Browser.IE){K.select("td").each(function(N){N.observe("mouseover",function(O){N=O.element();var P=N.previousSiblings();K.select("th[scope=col]")[P.length-1].addClassName("hover");K.select("colgroup col")[P.length].addClassName("hover")});N.observe("mouseout",function(){K.select("colgroup col.hover, th.hover").each(function(O){O.removeClassName("hover")})})})}var H=new Element("div",{className:"flotr-datagrid-toolbar"}).insert(new Element("button",{type:"button",className:"flotr-datagrid-toolbar-button"}).update(this.options.spreadsheet.toolbarDownload).observe("click",this.downloadCSV.bind(this))).insert(new Element("button",{type:"button",className:"flotr-datagrid-toolbar-button"}).update(this.options.spreadsheet.toolbarSelectAll).observe("click",this.selectAllData.bind(this)));var A=new Element("div",{className:"flotr-datagrid-container",style:"left:0px;top:0px;width:"+this.canvasWidth+"px;height:"+this.canvasHeight+"px;overflow:auto;"});A.insert(H);K.wrap(A.hide());this.el.insert(A);return K},selectAllData:function(){if(this.tabs){var B,A,E,D,C=this.constructDataGrid();this.showTab("data");(function(){if((E=C.ownerDocument)&&(D=E.defaultView)&&D.getSelection&&E.createRange&&(B=window.getSelection())&&B.removeAllRanges){A=E.createRange();A.selectNode(C);B.removeAllRanges();B.addRange(A)}else{if(document.body&&document.body.createTextRange&&(A=document.body.createTextRange())){A.moveToElementText(C);A.select()}}}).defer();return true}else{return false}},downloadCSV:function(){var D,A='"x"',C=this.series,E=this.loadDataGrid();for(D=0;D<C.length;++D){A+='%09"'+(C[D].label||String.fromCharCode(65+D))+'"'}A+="%0D%0A";for(D=0;D<E.length;++D){if(this.options.xaxis.ticks){var B=this.options.xaxis.ticks.find(function(F){return F[0]==E[D][0]});if(B){E[D][0]=B[1]}}else{E[D][0]=this.options.xaxis.tickFormatter(E[D][0])}A+=E[D].join("%09")+"%0D%0A"}if(Prototype.Browser.IE){A=A.gsub("%09","\t").gsub("%0A","\n").gsub("%0D","\r");window.open().document.write(A)}else{window.open("data:text/csv,"+A)}},initEvents:function(){this.overlay.stopObserving();this.overlay.observe("mousedown",this.mouseDownHandler.bind(this));this.overlay.observe("mousemove",this.mouseMoveHandler.bind(this));this.overlay.observe("click",this.clickHandler.bind(this))},findDataRanges:function(){var J=this.series,G=this.axes;G.x.datamin=0;G.x.datamax=0;G.x2.datamin=0;G.x2.datamax=0;G.y.datamin=0;G.y.datamax=0;G.y2.datamin=0;G.y2.datamax=0;if(J.length>0){var C,A,D,H,F,B,I,E;for(C=0;C<J.length;++C){B=J[C].data,I=J[C].xaxis,E=J[C].yaxis;if(B.length>0&&!J[C].hide){if(!I.used){I.datamin=I.datamax=B[0][0]}if(!E.used){E.datamin=E.datamax=B[0][1]}I.used=true;E.used=true;for(D=B.length-1;D>-1;--D){H=B[D][0];if(H<I.datamin){I.datamin=H}else{if(H>I.datamax){I.datamax=H}}for(A=1;A<B[D].length;A++){F=B[D][A];if(F<E.datamin){E.datamin=F}else{if(F>E.datamax){E.datamax=F}}}}}}}this.findXAxesValues();this.calculateRange(G.x);this.extendXRangeIfNeededByBar(G.x);if(G.x2.used){this.calculateRange(G.x2);this.extendXRangeIfNeededByBar(G.x2)}this.calculateRange(G.y);this.extendYRangeIfNeededByBar(G.y);if(G.y2.used){this.calculateRange(G.y2);this.extendYRangeIfNeededByBar(G.y2)}},calculateRange:function(D){var F=D.options,C=F.min!=null?F.min:D.datamin,A=F.max!=null?F.max:D.datamax,E;if(A-C==0){var B=(A==0)?1:0.01;C-=B;A+=B}D.tickSize=Flotr.getTickSize(F.noTicks,C,A,F.tickDecimals);if(F.min==null){E=F.autoscaleMargin;if(E!=0){C-=D.tickSize*E;if(C<0&&D.datamin>=0){C=0}C=D.tickSize*Math.floor(C/D.tickSize)}}if(F.max==null){E=F.autoscaleMargin;if(E!=0){A+=D.tickSize*E;if(A>0&&D.datamax<=0){A=0}A=D.tickSize*Math.ceil(A/D.tickSize)}}D.min=C;D.max=A},extendXRangeIfNeededByBar:function(A){if(A.options.max==null){var D=A.max,B,I,F,E,H=[],C=null;for(B=0;B<this.series.length;++B){I=this.series[B];F=I.bars;E=I.candles;if(I.axis==A&&(F.show||E.show)){if(!F.horizontal&&(F.barWidth+A.datamax>D)||(E.candleWidth+A.datamax>D)){D=A.max+I.bars.barWidth}if(F.stacked&&F.horizontal){for(j=0;j<I.data.length;j++){if(I.bars.show&&I.bars.stacked){var G=I.data[j][0];H[G]=(H[G]||0)+I.data[j][1];C=I}}for(j=0;j<H.length;j++){D=Math.max(H[j],D)}}}}A.lastSerie=C;A.max=D}},extendYRangeIfNeededByBar:function(A){if(A.options.max==null){var D=A.max,B,I,F,E,H=[],C=null;for(B=0;B<this.series.length;++B){I=this.series[B];F=I.bars;E=I.candles;if(I.yaxis==A&&F.show&&!I.hide){if(F.horizontal&&(F.barWidth+A.datamax>D)||(E.candleWidth+A.datamax>D)){D=A.max+F.barWidth}if(F.stacked&&!F.horizontal){for(j=0;j<I.data.length;j++){if(I.bars.show&&I.bars.stacked){var G=I.data[j][0];H[G]=(H[G]||0)+I.data[j][1];C=I}}for(j=0;j<H.length;j++){D=Math.max(H[j],D)}}}}A.lastSerie=C;A.max=D}},findXAxesValues:function(){for(i=this.series.length-1;i>-1;--i){s=this.series[i];s.xaxis.values=s.xaxis.values||[];for(j=s.data.length-1;j>-1;--j){s.xaxis.values[s.data[j][0]]={}}}},calculateTicks:function(D){var B=D.options,E,H;D.ticks=[];if(B.ticks){var G=B.ticks,I,F;if(Object.isFunction(G)){G=G({min:D.min,max:D.max})}for(E=0;E<G.length;++E){I=G[E];if(typeof (I)=="object"){H=I[0];F=(I.length>1)?I[1]:B.tickFormatter(H)}else{H=I;F=B.tickFormatter(H)}D.ticks[E]={v:H,label:F}}}else{var A=D.tickSize*Math.ceil(D.min/D.tickSize),C;for(E=0;A+E*D.tickSize<=D.max;++E){H=A+E*D.tickSize;C=B.tickDecimals;if(C==null){C=1-Math.floor(Math.log(D.tickSize)/Math.LN10)}if(C<0){C=0}H=H.toFixed(C);D.ticks.push({v:H,label:B.tickFormatter(H)})}}},calculateSpacing:function(){var L=this.axes,N=this.options,H=this.series,D=N.grid.labelMargin,M=L.x,A=L.x2,J=L.y,K=L.y2,F=2,G,E,C,I;[M,A,J,K].each(function(P){var O="";if(P.options.showLabels){for(G=0;G<P.ticks.length;++G){C=P.ticks[G].label.length;if(C>O.length){O=P.ticks[G].label}}}P.maxLabel=this.getTextDimensions(O,{size:N.fontSize,angle:Flotr.toRad(P.options.labelsAngle)},"font-size:smaller;","flotr-grid-label");P.titleSize=this.getTextDimensions(P.options.title,{size:N.fontSize*1.2,angle:Flotr.toRad(P.options.titleAngle)},"font-weight:bold;","flotr-axis-title")},this);I=this.getTextDimensions(N.title,{size:N.fontSize*1.5},"font-size:1em;font-weight:bold;","flotr-title");this.titleHeight=I.height;I=this.getTextDimensions(N.subtitle,{size:N.fontSize},"font-size:smaller;","flotr-subtitle");this.subtitleHeight=I.height;if(N.show){F=Math.max(F,N.points.radius+N.points.lineWidth/2)}for(E=0;E<N.length;++E){if(H[E].points.show){F=Math.max(F,H[E].points.radius+H[E].points.lineWidth/2)}}var B=this.plotOffset={left:0,right:0,top:0,bottom:0};B.left=B.right=B.top=B.bottom=F;B.bottom+=(M.options.showLabels?(M.maxLabel.height+D):0)+(M.options.title?(M.titleSize.height+D):0);B.top+=(A.options.showLabels?(A.maxLabel.height+D):0)+(A.options.title?(A.titleSize.height+D):0)+this.subtitleHeight+this.titleHeight;B.left+=(J.options.showLabels?(J.maxLabel.width+D):0)+(J.options.title?(J.titleSize.width+D):0);B.right+=(K.options.showLabels?(K.maxLabel.width+D):0)+(K.options.title?(K.titleSize.width+D):0);B.top=Math.floor(B.top);this.plotWidth=this.canvasWidth-B.left-B.right;this.plotHeight=this.canvasHeight-B.bottom-B.top;M.scale=this.plotWidth/(M.max-M.min);A.scale=this.plotWidth/(A.max-A.min);J.scale=this.plotHeight/(J.max-J.min);K.scale=this.plotHeight/(K.max-K.min)},draw:function(){this.drawGrid();this.drawLabels();this.drawTitles();if(this.series.length){this.el.fire("flotr:beforedraw",[this.series,this]);for(var A=0;A<this.series.length;A++){if(!this.series[A].hide){this.drawSeries(this.series[A])}}}this.el.fire("flotr:afterdraw",[this.series,this])},tHoz:function(A,B){B=B||this.axes.x;return(A-B.min)*B.scale},tVert:function(B,A){A=A||this.axes.y;return this.plotHeight-(B-A.min)*A.scale},drawGrid:function(){var B,E=this.options,A=this.ctx;if(E.grid.verticalLines||E.grid.horizontalLines){this.el.fire("flotr:beforegrid",[this.axes.x,this.axes.y,E,this])}A.save();A.translate(this.plotOffset.left,this.plotOffset.top);if(E.grid.backgroundColor!=null){A.fillStyle=E.grid.backgroundColor;A.fillRect(0,0,this.plotWidth,this.plotHeight)}A.lineWidth=1;A.strokeStyle=E.grid.tickColor;A.beginPath();if(E.grid.verticalLines){for(var D=0;D<this.axes.x.ticks.length;++D){B=this.axes.x.ticks[D].v;if((B==this.axes.x.min||B==this.axes.x.max)&&E.grid.outlineWidth!=0){continue}A.moveTo(Math.floor(this.tHoz(B))+A.lineWidth/2,0);A.lineTo(Math.floor(this.tHoz(B))+A.lineWidth/2,this.plotHeight)}}if(E.grid.horizontalLines){for(var C=0;C<this.axes.y.ticks.length;++C){B=this.axes.y.ticks[C].v;if((B==this.axes.y.min||B==this.axes.y.max)&&E.grid.outlineWidth!=0){continue}A.moveTo(0,Math.floor(this.tVert(B))+A.lineWidth/2);A.lineTo(this.plotWidth,Math.floor(this.tVert(B))+A.lineWidth/2)}}A.stroke();if(E.grid.outlineWidth!=0){A.lineWidth=E.grid.outlineWidth;A.strokeStyle=E.grid.color;A.lineJoin="round";A.strokeRect(0,0,this.plotWidth,this.plotHeight)}A.restore();if(E.grid.verticalLines||E.grid.horizontalLines){this.el.fire("flotr:aftergrid",[this.axes.x,this.axes.y,E,this])}},drawLabels:function(){var C=0,D,B,E,F,G,J=this.options,I=this.ctx,H=this.axes;for(E=0;E<H.x.ticks.length;++E){if(H.x.ticks[E].label){++C}}B=this.plotWidth/C;if(!J.HtmlText&&this.textEnabled){var A={size:J.fontSize,adjustAlign:true};D=H.x;A.color=D.options.color||J.grid.color;for(E=0;E<D.ticks.length&&D.options.showLabels&&D.used;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}A.angle=Flotr.toRad(D.options.labelsAngle);A.halign="c";A.valign="t";I.drawText(G.label,this.plotOffset.left+this.tHoz(G.v,D),this.plotOffset.top+this.plotHeight+J.grid.labelMargin,A)}D=H.x2;A.color=D.options.color||J.grid.color;for(E=0;E<D.ticks.length&&D.options.showLabels&&D.used;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}A.angle=Flotr.toRad(D.options.labelsAngle);A.halign="c";A.valign="b";I.drawText(G.label,this.plotOffset.left+this.tHoz(G.v,D),this.plotOffset.top+J.grid.labelMargin,A)}D=H.y;A.color=D.options.color||J.grid.color;for(E=0;E<D.ticks.length&&D.options.showLabels&&D.used;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}A.angle=Flotr.toRad(D.options.labelsAngle);A.halign="r";A.valign="m";I.drawText(G.label,this.plotOffset.left-J.grid.labelMargin,this.plotOffset.top+this.tVert(G.v,D),A)}D=H.y2;A.color=D.options.color||J.grid.color;for(E=0;E<D.ticks.length&&D.options.showLabels&&D.used;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}A.angle=Flotr.toRad(D.options.labelsAngle);A.halign="l";A.valign="m";I.drawText(G.label,this.plotOffset.left+this.plotWidth+J.grid.labelMargin,this.plotOffset.top+this.tVert(G.v,D),A);I.save();I.strokeStyle=A.color;I.beginPath();I.moveTo(this.plotOffset.left+this.plotWidth-8,this.plotOffset.top+this.tVert(G.v,D));I.lineTo(this.plotOffset.left+this.plotWidth,this.plotOffset.top+this.tVert(G.v,D));I.stroke();I.restore()}}else{if(H.x.options.showLabels||H.x2.options.showLabels||H.y.options.showLabels||H.y2.options.showLabels){F=['<div style="font-size:smaller;color:'+J.grid.color+';" class="flotr-labels">'];D=H.x;if(D.options.showLabels){for(E=0;E<D.ticks.length;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}F.push('<div style="position:absolute;top:'+(this.plotOffset.top+this.plotHeight+J.grid.labelMargin)+"px;left:"+(this.plotOffset.left+this.tHoz(G.v,D)-B/2)+"px;width:"+B+"px;text-align:center;"+(D.options.color?("color:"+D.options.color+";"):"")+'" class="flotr-grid-label">'+G.label+"</div>")}}D=H.x2;if(D.options.showLabels&&D.used){for(E=0;E<D.ticks.length;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}F.push('<div style="position:absolute;top:'+(this.plotOffset.top-J.grid.labelMargin-D.maxLabel.height)+"px;left:"+(this.plotOffset.left+this.tHoz(G.v,D)-B/2)+"px;width:"+B+"px;text-align:center;"+(D.options.color?("color:"+D.options.color+";"):"")+'" class="flotr-grid-label">'+G.label+"</div>")}}D=H.y;if(D.options.showLabels){for(E=0;E<D.ticks.length;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}F.push('<div style="position:absolute;top:'+(this.plotOffset.top+this.tVert(G.v,D)-D.maxLabel.height/2)+"px;left:0;width:"+(this.plotOffset.left-J.grid.labelMargin)+"px;text-align:right;"+(D.options.color?("color:"+D.options.color+";"):"")+'" class="flotr-grid-label">'+G.label+"</div>")}}D=H.y2;if(D.options.showLabels&&D.used){I.save();I.strokeStyle=D.options.color||J.grid.color;I.beginPath();for(E=0;E<D.ticks.length;++E){G=D.ticks[E];if(!G.label||G.label.length==0){continue}F.push('<div style="position:absolute;top:'+(this.plotOffset.top+this.tVert(G.v,D)-D.maxLabel.height/2)+"px;right:0;width:"+(this.plotOffset.right-J.grid.labelMargin)+"px;text-align:left;"+(D.options.color?("color:"+D.options.color+";"):"")+'" class="flotr-grid-label">'+G.label+"</div>");I.moveTo(this.plotOffset.left+this.plotWidth-8,this.plotOffset.top+this.tVert(G.v,D));I.lineTo(this.plotOffset.left+this.plotWidth,this.plotOffset.top+this.tVert(G.v,D))}I.stroke();I.restore()}F.push("</div>");this.el.insert(F.join(""))}}},drawTitles:function(){var D,C=this.options,F=C.grid.labelMargin,B=this.ctx,A=this.axes;if(!C.HtmlText&&this.textEnabled){var E={size:C.fontSize,color:C.grid.color,halign:"c"};if(C.subtitle){B.drawText(C.subtitle,this.plotOffset.left+this.plotWidth/2,this.titleHeight+this.subtitleHeight-2,E)}E.weight=1.5;E.size*=1.5;if(C.title){B.drawText(C.title,this.plotOffset.left+this.plotWidth/2,this.titleHeight-2,E)}E.weight=1.8;E.size*=0.8;E.adjustAlign=true;if(A.x.options.title&&A.x.used){E.halign="c";E.valign="t";E.angle=Flotr.toRad(A.x.options.titleAngle);B.drawText(A.x.options.title,this.plotOffset.left+this.plotWidth/2,this.plotOffset.top+A.x.maxLabel.height+this.plotHeight+2*F,E)}if(A.x2.options.title&&A.x2.used){E.halign="c";E.valign="b";E.angle=Flotr.toRad(A.x2.options.titleAngle);B.drawText(A.x2.options.title,this.plotOffset.left+this.plotWidth/2,this.plotOffset.top-A.x2.maxLabel.height-2*F,E)}if(A.y.options.title&&A.y.used){E.halign="r";E.valign="m";E.angle=Flotr.toRad(A.y.options.titleAngle);B.drawText(A.y.options.title,this.plotOffset.left-A.y.maxLabel.width-2*F,this.plotOffset.top+this.plotHeight/2,E)}if(A.y2.options.title&&A.y2.used){E.halign="l";E.valign="m";E.angle=Flotr.toRad(A.y2.options.titleAngle);B.drawText(A.y2.options.title,this.plotOffset.left+this.plotWidth+A.y2.maxLabel.width+2*F,this.plotOffset.top+this.plotHeight/2,E)}}else{D=['<div style="color:'+C.grid.color+';" class="flotr-titles">'];if(C.title){D.push('<div style="position:absolute;top:0;left:'+this.plotOffset.left+"px;font-size:1em;font-weight:bold;text-align:center;width:"+this.plotWidth+'px;" class="flotr-title">'+C.title+"</div>")}if(C.subtitle){D.push('<div style="position:absolute;top:'+this.titleHeight+"px;left:"+this.plotOffset.left+"px;font-size:smaller;text-align:center;width:"+this.plotWidth+'px;" class="flotr-subtitle">'+C.subtitle+"</div>")}D.push("</div>");D.push('<div class="flotr-axis-title" style="font-weight:bold;">');if(A.x.options.title&&A.x.used){D.push('<div style="position:absolute;top:'+(this.plotOffset.top+this.plotHeight+C.grid.labelMargin+A.x.titleSize.height)+"px;left:"+this.plotOffset.left+"px;width:"+this.plotWidth+'px;text-align:center;" class="flotr-axis-title">'+A.x.options.title+"</div>")}if(A.x2.options.title&&A.x2.used){D.push('<div style="position:absolute;top:0;left:'+this.plotOffset.left+"px;width:"+this.plotWidth+'px;text-align:center;" class="flotr-axis-title">'+A.x2.options.title+"</div>")}if(A.y.options.title&&A.y.used){D.push('<div style="position:absolute;top:'+(this.plotOffset.top+this.plotHeight/2-A.y.titleSize.height/2)+'px;left:0;text-align:right;" class="flotr-axis-title">'+A.y.options.title+"</div>")}if(A.y2.options.title&&A.y2.used){D.push('<div style="position:absolute;top:'+(this.plotOffset.top+this.plotHeight/2-A.y.titleSize.height/2)+'px;right:0;text-align:right;" class="flotr-axis-title">'+A.y2.options.title+"</div>")}D.push("</div>");this.el.insert(D.join(""))}},drawSeries:function(A){A=A||this.series;var C=false;for(var B in Flotr._registeredTypes){if(A[B]&&A[B].show){this[Flotr._registeredTypes[B]](A);C=true}}if(!C){this[Flotr._registeredTypes[this.options.defaultType]](A)}},plotLine:function(I,F){var O=this.ctx,A=I.xaxis,K=I.yaxis,J=this.tHoz.bind(this),M=this.tVert.bind(this),H=I.data;if(H.length<2){return }var E=J(H[0][0],A),D=M(H[0][1],K)+F;O.beginPath();O.moveTo(E,D);for(var G=0;G<H.length-1;++G){var C=H[G][0],N=H[G][1],B=H[G+1][0],L=H[G+1][1];if(N===null||L===null){continue}if(N<=L&&N<K.min){if(L<K.min){continue}C=(K.min-N)/(L-N)*(B-C)+C;N=K.min}else{if(L<=N&&L<K.min){if(N<K.min){continue}B=(K.min-N)/(L-N)*(B-C)+C;L=K.min}}if(N>=L&&N>K.max){if(L>K.max){continue}C=(K.max-N)/(L-N)*(B-C)+C;N=K.max}else{if(L>=N&&L>K.max){if(N>K.max){continue}B=(K.max-N)/(L-N)*(B-C)+C;L=K.max}}if(C<=B&&C<A.min){if(B<A.min){continue}N=(A.min-C)/(B-C)*(L-N)+N;C=A.min}else{if(B<=C&&B<A.min){if(C<A.min){continue}L=(A.min-C)/(B-C)*(L-N)+N;B=A.min}}if(C>=B&&C>A.max){if(B>A.max){continue}N=(A.max-C)/(B-C)*(L-N)+N;C=A.max}else{if(B>=C&&B>A.max){if(C>A.max){continue}L=(A.max-C)/(B-C)*(L-N)+N;B=A.max}}if(E!=J(C,A)||D!=M(N,K)+F){O.moveTo(J(C,A),M(N,K)+F)}E=J(B,A);D=M(L,K)+F;O.lineTo(E,D)}O.stroke()},plotLineArea:function(J,D){var S=J.data;if(S.length<2){return }var L,G=0,N=this.ctx,Q=J.xaxis,B=J.yaxis,E=this.tHoz.bind(this),M=this.tVert.bind(this),H=Math.min(Math.max(0,B.min),B.max),F=true;N.beginPath();for(var O=0;O<S.length-1;++O){var R=S[O][0],C=S[O][1],P=S[O+1][0],A=S[O+1][1];if(R<=P&&R<Q.min){if(P<Q.min){continue}C=(Q.min-R)/(P-R)*(A-C)+C;R=Q.min}else{if(P<=R&&P<Q.min){if(R<Q.min){continue}A=(Q.min-R)/(P-R)*(A-C)+C;P=Q.min}}if(R>=P&&R>Q.max){if(P>Q.max){continue}C=(Q.max-R)/(P-R)*(A-C)+C;R=Q.max}else{if(P>=R&&P>Q.max){if(R>Q.max){continue}A=(Q.max-R)/(P-R)*(A-C)+C;P=Q.max}}if(F){N.moveTo(E(R,Q),M(H,B)+D);F=false}if(C>=B.max&&A>=B.max){N.lineTo(E(R,Q),M(B.max,B)+D);N.lineTo(E(P,Q),M(B.max,B)+D);continue}else{if(C<=B.min&&A<=B.min){N.lineTo(E(R,Q),M(B.min,B)+D);N.lineTo(E(P,Q),M(B.min,B)+D);continue}}var I=R,K=P;if(C<=A&&C<B.min&&A>=B.min){R=(B.min-C)/(A-C)*(P-R)+R;C=B.min}else{if(A<=C&&A<B.min&&C>=B.min){P=(B.min-C)/(A-C)*(P-R)+R;A=B.min}}if(C>=A&&C>B.max&&A<=B.max){R=(B.max-C)/(A-C)*(P-R)+R;C=B.max}else{if(A>=C&&A>B.max&&C<=B.max){P=(B.max-C)/(A-C)*(P-R)+R;A=B.max}}if(R!=I){L=(C<=B.min)?L=B.min:B.max;N.lineTo(E(I,Q),M(L,B)+D);N.lineTo(E(R,Q),M(L,B)+D)}N.lineTo(E(R,Q),M(C,B)+D);N.lineTo(E(P,Q),M(A,B)+D);if(P!=K){L=(A<=B.min)?B.min:B.max;N.lineTo(E(K,Q),M(L,B)+D);N.lineTo(E(P,Q),M(L,B)+D)}G=Math.max(P,K)}N.lineTo(E(G,Q),M(H,B)+D);N.closePath();N.fill()},drawSeriesLines:function(C){C=C||this.series;var B=this.ctx;B.save();B.translate(this.plotOffset.left,this.plotOffset.top);B.lineJoin="round";var D=C.lines.lineWidth;var A=C.shadowSize;if(A>0){B.lineWidth=A/2;var E=D/2+B.lineWidth/2;B.strokeStyle="rgba(0,0,0,0.1)";this.plotLine(C,E+A/2);B.strokeStyle="rgba(0,0,0,0.2)";this.plotLine(C,E);if(C.lines.fill){B.fillStyle="rgba(0,0,0,0.05)";this.plotLineArea(C,E+A/2)}}B.lineWidth=D;B.strokeStyle=C.color;if(C.lines.fill){B.fillStyle=C.lines.fillColor!=null?C.lines.fillColor:Flotr.parseColor(C.color).scale(null,null,null,C.lines.fillOpacity).toString();this.plotLineArea(C,0)}this.plotLine(C,0);B.restore()},drawSeriesPoints:function(C){var B=this.ctx;B.save();B.translate(this.plotOffset.left,this.plotOffset.top);var D=C.lines.lineWidth;var A=C.shadowSize;if(A>0){B.lineWidth=A/2;B.strokeStyle="rgba(0,0,0,0.1)";this.plotPointShadows(C,A/2+B.lineWidth/2,C.points.radius);B.strokeStyle="rgba(0,0,0,0.2)";this.plotPointShadows(C,B.lineWidth/2,C.points.radius)}B.lineWidth=C.points.lineWidth;B.strokeStyle=C.color;B.fillStyle=C.points.fillColor!=null?C.points.fillColor:C.color;this.plotPoints(C,C.points.radius,C.points.fill);B.restore()},plotPoints:function(C,E,I){var A=C.xaxis,F=C.yaxis,J=this.ctx,D,B=C.data;for(D=B.length-1;D>-1;--D){var H=B[D][0],G=B[D][1];if(H<A.min||H>A.max||G<F.min||G>F.max){continue}J.beginPath();J.arc(this.tHoz(H,A),this.tVert(G,F),E,0,2*Math.PI,true);if(I){J.fill()}J.stroke()}},plotPointShadows:function(D,B,F){var A=D.xaxis,G=D.yaxis,J=this.ctx,E,C=D.data;for(E=C.length-1;E>-1;--E){var I=C[E][0],H=C[E][1];if(I<A.min||I>A.max||H<G.min||H>G.max){continue}J.beginPath();J.arc(this.tHoz(I,A),this.tVert(H,G)+B,F,0,Math.PI,false);J.stroke()}},drawSeriesBars:function(B){var A=this.ctx,D=B.bars.barWidth,C=Math.min(B.bars.lineWidth,D);A.save();A.translate(this.plotOffset.left,this.plotOffset.top);A.lineJoin="miter";A.lineWidth=C;A.strokeStyle=B.color;this.plotBarsShadows(B,D,0,B.bars.fill);if(B.bars.fill){A.fillStyle=B.bars.fillColor!=null?B.bars.fillColor:Flotr.parseColor(B.color).scale(null,null,null,B.bars.fillOpacity).toString()}this.plotBars(B,D,0,B.bars.fill);A.restore()},plotBars:function(K,N,D,Q){var U=K.data;if(U.length<1){return }var S=K.xaxis,B=K.yaxis,P=this.ctx,F=this.tHoz.bind(this),O=this.tVert.bind(this);for(var R=0;R<U.length;R++){var J=U[R][0],I=U[R][1];var E=true,L=true,A=true;var H=0;if(K.bars.stacked){S.values.each(function(W,V){if(V==J){H=W.stack||0;W.stack=H+I}})}if(K.bars.horizontal){var C=H,T=J+H,G=I,M=I+N}else{var C=J,T=J+N,G=H,M=I+H}if(T<S.min||C>S.max||M<B.min||G>B.max){continue}if(C<S.min){C=S.min;E=false}if(T>S.max){T=S.max;if(S.lastSerie!=K&&K.bars.horizontal){L=false}}if(G<B.min){G=B.min}if(M>B.max){M=B.max;if(B.lastSerie!=K&&!K.bars.horizontal){L=false}}if(Q){P.beginPath();P.moveTo(F(C,S),O(G,B)+D);P.lineTo(F(C,S),O(M,B)+D);P.lineTo(F(T,S),O(M,B)+D);P.lineTo(F(T,S),O(G,B)+D);P.fill()}if(K.bars.lineWidth!=0&&(E||A||L)){P.beginPath();P.moveTo(F(C,S),O(G,B)+D);P[E?"lineTo":"moveTo"](F(C,S),O(M,B)+D);P[L?"lineTo":"moveTo"](F(T,S),O(M,B)+D);P[A?"lineTo":"moveTo"](F(T,S),O(G,B)+D);P.stroke()}}},plotBarsShadows:function(I,K,C){var T=I.data;if(T.length<1){return }var R=I.xaxis,A=I.yaxis,P=this.ctx,D=this.tHoz.bind(this),M=this.tVert.bind(this),N=this.options.shadowSize;for(var Q=0;Q<T.length;Q++){var H=T[Q][0],G=T[Q][1];var E=0;if(I.bars.stacked){R.values.each(function(V,U){if(U==H){E=V.stackShadow||0;V.stackShadow=E+G}})}if(I.bars.horizontal){var B=E,S=H+E,F=G,J=G+K}else{var B=H,S=H+K,F=E,J=G+E}if(S<R.min||B>R.max||J<A.min||F>A.max){continue}if(B<R.min){B=R.min}if(S>R.max){S=R.max}if(F<A.min){F=A.min}if(J>A.max){J=A.max}var O=D(S,R)-D(B,R)-((D(S,R)+N<=this.plotWidth)?0:N);var L=Math.max(0,M(F,A)-M(J,A)-((M(F,A)+N<=this.plotHeight)?0:N));P.fillStyle="rgba(0,0,0,0.05)";P.fillRect(Math.min(D(B,R)+N,this.plotWidth),Math.min(M(J,A)+N,this.plotWidth),O,L)}},drawSeriesCandles:function(B){var A=this.ctx,C=B.candles.candleWidth;A.save();A.translate(this.plotOffset.left,this.plotOffset.top);A.lineJoin="miter";A.lineWidth=B.candles.lineWidth;this.plotCandlesShadows(B,C/2);this.plotCandles(B,C/2);A.restore()},plotCandles:function(K,D){var W=K.data;if(W.length<1){return }var T=K.xaxis,B=K.yaxis,P=this.ctx,E=this.tHoz.bind(this),O=this.tVert.bind(this);for(var S=0;S<W.length;S++){var U=W[S],J=U[0],L=U[1],I=U[2],X=U[3],N=U[4];var C=J,V=J+K.candles.candleWidth,G=Math.max(B.min,X),M=Math.min(B.max,I),A=Math.max(B.min,Math.min(L,N)),R=Math.min(B.max,Math.max(L,N));if(V<T.min||C>T.max||M<B.min||G>B.max){continue}var Q=K.candles[L>N?"downFillColor":"upFillColor"];if(K.candles.fill&&!K.candles.barcharts){P.fillStyle=Flotr.parseColor(Q).scale(null,null,null,K.candles.fillOpacity).toString();P.fillRect(E(C,T),O(R,B)+D,E(V,T)-E(C,T),O(A,B)-O(R,B))}if(K.candles.lineWidth||K.candles.wickLineWidth){var J,H,F=(K.candles.wickLineWidth%2)/2;J=Math.floor(E((C+V)/2),T)+F;P.save();P.strokeStyle=Q;P.lineWidth=K.candles.wickLineWidth;P.lineCap="butt";if(K.candles.barcharts){P.beginPath();P.moveTo(J,Math.floor(O(M,B)+D));P.lineTo(J,Math.floor(O(G,B)+D));H=Math.floor(O(L,B)+D)+0.5;P.moveTo(Math.floor(E(C,T))+F,H);P.lineTo(J,H);H=Math.floor(O(N,B)+D)+0.5;P.moveTo(Math.floor(E(V,T))+F,H);P.lineTo(J,H)}else{P.strokeRect(E(C,T),O(R,B)+D,E(V,T)-E(C,T),O(A,B)-O(R,B));P.beginPath();P.moveTo(J,Math.floor(O(R,B)+D));P.lineTo(J,Math.floor(O(M,B)+D));P.moveTo(J,Math.floor(O(A,B)+D));P.lineTo(J,Math.floor(O(G,B)+D))}P.stroke();P.restore()}}},plotCandlesShadows:function(H,C){var T=H.data;if(T.length<1||H.candles.barcharts){return }var Q=H.xaxis,A=H.yaxis,D=this.tHoz.bind(this),M=this.tVert.bind(this),N=this.options.shadowSize;for(var P=0;P<T.length;P++){var R=T[P],G=R[0],I=R[1],F=R[2],U=R[3],K=R[4];var B=G,S=G+H.candles.candleWidth,E=Math.max(A.min,Math.min(I,K)),J=Math.min(A.max,Math.max(I,K));if(S<Q.min||B>Q.max||J<A.min||E>A.max){continue}var O=D(S,Q)-D(B,Q)-((D(S,Q)+N<=this.plotWidth)?0:N);var L=Math.max(0,M(E,A)-M(J,A)-((M(E,A)+N<=this.plotHeight)?0:N));this.ctx.fillStyle="rgba(0,0,0,0.05)";this.ctx.fillRect(Math.min(D(B,Q)+N,this.plotWidth),Math.min(M(J,A)+N,this.plotWidth),O,L)}},drawSeriesPie:function(G){if(!this.options.pie.drawn){var K=this.ctx,C=this.options,E=G.pie.lineWidth,I=G.shadowSize,R=G.data,D=(Math.min(this.canvasWidth,this.canvasHeight)*G.pie.sizeRatio)/2,H=[];var L=1;var P=Math.sin(G.pie.viewAngle)*G.pie.spliceThickness/L;var M={size:C.fontSize*1.2,color:C.grid.color,weight:1.5};var Q={x:(this.canvasWidth+this.plotOffset.left)/2,y:(this.canvasHeight-this.plotOffset.bottom)/2};var O=this.series.collect(function(T,S){if(T.pie.show){return{name:(T.label||T.data[0][1]),value:[S,T.data[0][1]],explode:T.pie.explode}}});var B=O.pluck("value").pluck(1).inject(0,function(S,T){return S+T});var F=0,N=G.pie.startAngle,J=0;var A=O.collect(function(S){N+=F;J=parseFloat(S.value[1]);F=J/B;return{name:S.name,fraction:F,x:S.value[0],y:J,explode:S.explode,startAngle:2*N*Math.PI,endAngle:2*(N+F)*Math.PI}});K.save();if(I>0){A.each(function(V){var S=(V.startAngle+V.endAngle)/2;var T=Q.x+Math.cos(S)*V.explode+I;var U=Q.y+Math.sin(S)*V.explode+I;this.plotSlice(T,U,D,V.startAngle,V.endAngle,false,L);K.fillStyle="rgba(0,0,0,0.1)";K.fill()},this)}if(C.HtmlText){H=['<div style="color:'+this.options.grid.color+'" class="flotr-labels">']}A.each(function(c,X){var W=(c.startAngle+c.endAngle)/2;var V=C.colors[X];var Y=Q.x+Math.cos(W)*c.explode;var U=Q.y+Math.sin(W)*c.explode;this.plotSlice(Y,U,D,c.startAngle,c.endAngle,false,L);if(G.pie.fill){K.fillStyle=Flotr.parseColor(V).scale(null,null,null,G.pie.fillOpacity).toString();K.fill()}K.lineWidth=E;K.strokeStyle=V;K.stroke();var b=C.pie.labelFormatter(c);var S=(Math.cos(W)<0);var a=Y+Math.cos(W)*(G.pie.explode+D);var Z=U+Math.sin(W)*(G.pie.explode+D);if(c.fraction&&b){if(C.HtmlText){var T="position:absolute;top:"+(Z-5)+"px;";if(S){T+="right:"+(this.canvasWidth-a)+"px;text-align:right;"}else{T+="left:"+a+"px;text-align:left;"}H.push('<div style="'+T+'" class="flotr-grid-label">'+b+"</div>")}else{M.halign=S?"r":"l";K.drawText(b,a,Z+M.size/2,M)}}},this);if(C.HtmlText){H.push("</div>");this.el.insert(H.join(""))}K.restore();C.pie.drawn=true}},plotSlice:function(B,H,A,E,D,F,G){var C=this.ctx;G=G||1;C.save();C.scale(1,G);C.beginPath();C.moveTo(B,H);C.arc(B,H,A,E,D,F);C.lineTo(B,H);C.closePath();C.restore()},plotPie:function(){},insertLegend:function(){if(!this.options.legend.show){return }var H=this.series,I=this.plotOffset,B=this.options,b=[],A=false,O=this.ctx,R;var Q=H.findAll(function(c){return(c.label&&!c.hide)}).size();if(Q){if(!B.HtmlText&&this.textEnabled){var T={size:B.fontSize*1.1,color:B.grid.color};var M=B.legend.position,N=B.legend.margin,L=B.legend.labelBoxWidth,Z=B.legend.labelBoxHeight,S=B.legend.labelBoxMargin,W=I.left+N,U=I.top+N;var a=0;for(R=H.length-1;R>-1;--R){if(!H[R].label||H[R].hide){continue}var E=B.legend.labelFormatter(H[R].label);a=Math.max(a,O.measureText(E,T))}var K=Math.round(L+S*3+a),C=Math.round(Q*(S+Z)+S);if(M.charAt(0)=="s"){U=I.top+this.plotHeight-(N+C)}if(M.charAt(1)=="e"){W=I.left+this.plotWidth-(N+K)}var P=Flotr.parseColor(B.legend.backgroundColor||"rgb(240,240,240)").scale(null,null,null,B.legend.backgroundOpacity||0.1).toString();O.fillStyle=P;O.fillRect(W,U,K,C);O.strokeStyle=B.legend.labelBoxBorderColor;O.strokeRect(Flotr.toPixel(W),Flotr.toPixel(U),K,C);var G=W+S;var F=U+S;for(R=0;R<H.length;R++){if(!H[R].label||H[R].hide){continue}var E=B.legend.labelFormatter(H[R].label);O.fillStyle=H[R].color;O.fillRect(G,F,L-1,Z-1);O.strokeStyle=B.legend.labelBoxBorderColor;O.lineWidth=1;O.strokeRect(Math.ceil(G)-1.5,Math.ceil(F)-1.5,L+2,Z+2);O.drawText(E,G+L+S,F+(Z+T.size-O.fontDescent(T))/2,T);F+=Z+S}}else{for(R=0;R<H.length;++R){if(!H[R].label||H[R].hide){continue}if(R%B.legend.noColumns==0){b.push(A?"</tr><tr>":"<tr>");A=true}var E=B.legend.labelFormatter(H[R].label);b.push('<td class="flotr-legend-color-box"><div style="border:1px solid '+B.legend.labelBoxBorderColor+';padding:1px"><div style="width:'+B.legend.labelBoxWidth+"px;height:" |