Add OpenID auth for editing pages
--- /dev/null
+++ b/.box
@@ -1,1 +1,5 @@
+shared_writable_dirs:
+ - /labs/tiles
+ - /lib/staticmaplite/cache
+php_extensions: [pgsql, pdo, pdo_pgsql, curl]
--- /dev/null
+++ b/.gitignore
@@ -1,1 +1,8 @@
+/labs/tiles/12
+/labs/tiles/13
+/labs/tiles/14
+/labs/tiles/15
+/labs/tiles/16
+/labs/tiles/17
+/labs/tiles/19
--- a/about.php
+++ b/about.php
@@ -17,6 +17,10 @@
Feedback encouraged; contact maxious@lambdacomplex.org<br />
<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 />
<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,
--- a/aws/awsStartup.sh
+++ b/aws/awsStartup.sh
@@ -5,35 +5,9 @@
#postgres postgres-server php-pg
#http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12
-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
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
--O /var/www/cbrfeed.zip
+sh busuiphp.sh
+sh busuidb.sh
+sh busuiotp.sh
-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
--- /dev/null
+++ b/aws/busuidb.sh
@@ -1,1 +1,14 @@
-
+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
--- /dev/null
+++ b/aws/busuiotp.sh
@@ -1,1 +1,10 @@
+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
--- /dev/null
+++ b/aws/busuiotp.testing.sh
@@ -1,1 +1,10 @@
+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
--- /dev/null
+++ b/aws/busuiphp.sh
@@ -1,1 +1,16 @@
+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
--- /dev/null
+++ b/aws/data-sources.xml
@@ -1,1 +1,13 @@
+<?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>
+
--- a/css/jquery.mobile-1.0b1.css
+++ /dev/null
@@ -1,1662 +1,1 @@
-/*!
- * 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 }
-
--- /dev/null
+++ b/css/jquery.mobile-1.0b2.css
@@ -1,1 +1,1641 @@
-
+/*!
+ * 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 }
+
--- /dev/null
+++ b/css/local.css.php
@@ -1,1 +1,216 @@
-
+<?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();
+?>
+
--- a/dotcloud/postinstall
+++ b/dotcloud/postinstall
@@ -3,8 +3,8 @@
curl http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
-o /home/dotcloud/current/cbrfeed.zip
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \
--O /tmp/Graph.obj
+curl http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \
+-o /tmp/Graph.obj
#db setup
#curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz
--- /dev/null
+++ b/include/common-auth.inc.php
@@ -1,1 +1,91 @@
+<?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();
+?>
--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -23,43 +23,42 @@
$url.= "&guid=ON";
return str_replace("&", "&", $url);
}
-
function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false)
{
-global $labsPath;
+ global $labsPath,$serviceAlertsEnabled;
echo '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
- <title>' . $pageTitle . '</title>
- <meta name="google-site-verification"
-content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" />
- <link rel="stylesheet" href="'.$labsPath.'css/jquery-ui-1.8.12.custom.css" />';
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>' . $pageTitle . '</title>
+ <meta name="google-site-verification" content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" />
+<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()) {
- echo '<link rel="stylesheet" href="'.$labsPath.'css/jquery.mobile-1.0b1.css" />
-
- <script type="text/javascript" src="'.$labsPath.'js/jquery-1.6.1.min.js"></script>
- <script>$(document).bind("mobileinit", function(){
+ $jqmcss = $labsPath . 'css/jquery.mobile-1.0b2.css';
+ $jqjs = $labsPath . 'js/jquery-1.6.2.min.js';
+ $jqmjs = $labsPath . 'js/jquery.mobile-1.0b2.js';
+ }
+ 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;
});
-</script>
- <script type="text/javascript" src="'.$labsPath.'js/jquery.mobile-1.0b1.js"></script>';
- }
- else {
- echo '<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
- <script>$(document).bind("mobileinit", function(){
- $.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 src="'.$jqmjs.'"></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 src="' . $labsPath . 'js/jquery.ui.autocomplete.min.js"></script>
<script>
$(function() {
$( "#geolocate" ).autocomplete({
@@ -75,11 +74,9 @@
minLength: 2
});
});
- </script>
- ';
+ </script>';
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,
+ 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-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 {
@@ -87,11 +84,8 @@
box-shadow: none;
-webkit-box-shadow: none;
}';
-echo '</style>';
-
-echo '<link rel="stylesheet" href="'.$labsPath.'css/local.css.php?labsPath='.$labsPath.'" />';
-
-
+ echo '</style>';
+ echo '<link rel="stylesheet" href="' . $labsPath . 'css/local.css.php" />';
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" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@@ -148,28 +142,33 @@
<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>
<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 -->
<a name="maincontent" id="maincontent"></a>
<div data-role="content"> ';
$overrides = getServiceOverride();
if ($overrides['service_id']) {
- if ($overrides['service_id'] == "noservice") {
- echo '<div id="servicewarning">Buses are <strong>not running today</strong> due to industrial action/public holiday. See <a
+ if ($overrides['service_id'] == "noservice") {
+ 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>';
- }
- 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>';
- }
+ }
+ 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>';
}
}
-
+ 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()
{
-
-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>';
+ 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>';
if (isAnalyticsOn()) {
echo "<script> (function() {
@@ -182,17 +181,15 @@
})();</script>";
$googleAnalyticsImageUrl = googleAnalyticsGetImageUrl();
echo '<noscript><img src="' . $googleAnalyticsImageUrl . '" /></noscript>';
-
- }
- echo "\n</div></div></body></html>";
-}
-function timePlaceSettings($geolocate = false)
+ }
+ echo "\n</div></div></body></html>";
+}
+function placeSettings()
{
global $service_periods;
$geoerror = false;
- if ($geolocate == true) {
$geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "";
- }
+
echo '<div id="error">';
if ($geoerror) {
echo 'Sorry, but your location could not currently be detected.
@@ -201,27 +198,13 @@
}
echo '</div>';
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">
<div class="ui-body">
<div data-role="fieldcontain">
<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>
</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"/>
</div></form>
--- a/include/common-transit.inc.php
+++ b/include/common-transit.inc.php
@@ -45,5 +45,68 @@
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"];
+ }
+ }
+}
?>
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -10,6 +10,7 @@
"database",
"other"
);
+$serviceAlertsEnabled = true;
$cloudmadeAPIkey = "daa03470bb8740298d4b10e3f03d63e6";
$googleMapsAPIkey = "ABQIAAAA95XYXN0cki3Yj_Sb71CFvBTPaLd08ONybQDjcH_VdYtHHLgZvRTw2INzI_m17_IoOUqH3RNNmlTk1Q";
$otpAPIurl = 'http://localhost:8080/opentripplanner-api-webapp/';
@@ -31,7 +32,8 @@
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");
@@ -41,6 +43,7 @@
include_once ("common-request.inc.php");
include_once ("common-session.inc.php");
+include_once ("common-auth.inc.php");
include_once ("common-template.inc.php");
@@ -53,6 +56,7 @@
global $debugOkay;
return in_array($debugReason, $debugOkay, false) && isDebugServer();
}
+
function debug($msg, $debugReason = "other")
{
if (isDebug($debugReason)) echo "\n<!-- " . date(DATE_RFC822) . "\n $msg -->\n";
@@ -185,5 +189,6 @@
}
return implode( $glue, $retVal );
}
+
?>
--- a/include/db/route-dao.inc.php
+++ b/include/db/route-dao.inc.php
@@ -1,211 +1,222 @@
<?php
function getRoute($routeID)
-{
- global $conn;
- $query = "Select * from routes where route_id = :routeID LIMIT 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":routeID", $routeID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+
+{
+ global $conn;
+ $query = "Select * from routes where route_id = :routeID LIMIT 1";
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":routeID", $routeID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
function getRouteByFullName($routeFullName)
-{
- global $conn;
- $query = "Select * from routes where route_short_name||route_long_name = :routeFullName LIMIT 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":routeFullName", $routeFullName);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+
+{
+ global $conn;
+ $query = "Select * from routes where route_short_name||route_long_name = :routeFullName LIMIT 1";
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":routeFullName", $routeFullName);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
function getRoutes()
-{
- global $conn;
- $query = "Select * from routes order by route_short_name;";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+
+{
+ global $conn;
+ $query = "Select * from routes order by route_short_name;";
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getRoutesByNumber($routeNumber = "")
-{
- global $conn;
- 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 =
+
+{
+ global $conn;
+ 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
where route_short_name = :routeNumber OR route_short_name LIKE :routeNumber2 order by route_short_name;";
- }
- else {
- $query = "SELECT DISTINCT route_short_name from routes order by route_short_name";
- }
- debug($query, "database");
- $query = $conn->prepare($query);
- if ($routeNumber != "") {
- $query->bindParam(":routeNumber", $routeNumber);
- $routeNumber2 = "% ".$routeNumber;
- $query->bindParam(":routeNumber2", $routeNumber2);
- }
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ }
+ else {
+ $query = "SELECT DISTINCT route_short_name from routes order by route_short_name";
+ }
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ if ($routeNumber != "") {
+ $query -> bindParam(":routeNumber", $routeNumber);
+ $routeNumber2 = "% " . $routeNumber;
+ $query -> bindParam(":routeNumber2", $routeNumber2);
+ }
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getRoutesByNumberSeries($routeNumberSeries = "")
-{
- global $conn;
- if (strlen($routeNumberSeries) == 1) {
- return getRoutesByNumber($routeNumberSeries);
- }
- $seriesMin = substr($routeNumberSeries, 0, -1) . "0";
- $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 =
+
+{
+ global $conn;
+ if (strlen($routeNumberSeries) == 1) {
+ return getRoutesByNumber($routeNumberSeries);
+ }
+ $seriesMin = substr($routeNumberSeries, 0, -1) . "0";
+ $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;";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":seriesMin", $seriesMin);
- $query->bindParam(":seriesMax", $seriesMax);
- $routeNumberSeries = "% ".substr($routeNumberSeries, 0, -1)."%";
- $query->bindParam(":routeNumberSeries", $routeNumberSeries);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":seriesMin", $seriesMin);
+ $query -> bindParam(":seriesMax", $seriesMax);
+ $routeNumberSeries = "% " . substr($routeNumberSeries, 0, -1) . "%";
+ $query -> bindParam(":routeNumberSeries", $routeNumberSeries);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
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
arrival_time > :currentTime and routes.route_id = :routeID order by
arrival_time limit 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":currentTime", current_time());
- $query->bindParam(":routeID", $routeID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- $r = $query->fetch(PDO::FETCH_ASSOC);
-
- // past last trip of the day special case
- if (sizeof($r) < 16) {
- $query = "select * from routes join trips on trips.route_id = routes.route_id
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":currentTime", current_time());
+ $query -> bindParam(":routeID", $routeID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ $r = $query -> fetch(PDO :: FETCH_ASSOC);
+
+ // past last trip of the day special case
+ if (sizeof($r) < 16) {
+ $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
arrival_time DESC limit 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":routeID", $routeID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
-
- $r = $query->fetch(PDO::FETCH_ASSOC);
- }
- return $r;
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":routeID", $routeID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+
+ $r = $query -> fetch(PDO :: FETCH_ASSOC);
+ }
+ return $r;
+ }
function getTimeInterpolatedRouteAtStop($routeID, $stop_id)
-{
- $nextTrip = getRouteNextTrip($routeID);
- if ($nextTrip['trip_id']) {
- foreach (getTimeInterpolatedTrip($nextTrip['trip_id']) as $tripStop) {
- if ($tripStop['stop_id'] == $stop_id) return $tripStop;
- }
- }
- return Array();
-}
+
+{
+ $nextTrip = getRouteNextTrip($routeID);
+ if ($nextTrip['trip_id']) {
+ foreach (getTimeInterpolatedTrip($nextTrip['trip_id']) as $tripStop) {
+ if ($tripStop['stop_id'] == $stop_id) return $tripStop;
+ }
+ }
+ return Array();
+ }
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
arrival_time ";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":routeID", $routeID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":routeID", $routeID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getRoutesByDestination($destination = "", $service_period = "")
-{
- global $conn;
- if ($service_period == "") $service_period = service_period();
- if ($destination != "") {
- $query = "SELECT DISTINCT trips.route_id,route_short_name,route_long_name, service_id
+
+{
+ global $conn;
+ if ($service_period == "") $service_period = service_period();
+ 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 =
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";
- }
- else {
- $query = "SELECT DISTINCT route_long_name
+ }
+ else {
+ $query = "SELECT DISTINCT route_long_name
FROM stop_times join trips on trips.trip_id =
stop_times.trip_id join routes on trips.route_id = routes.route_id
WHERE service_id= :service_period order by route_long_name";
- }
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":service_period", $service_period);
- if ($destination != "") $query->bindParam(":destination", $destination);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ }
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":service_period", $service_period);
+ if ($destination != "") $query -> bindParam(":destination", $destination);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getRoutesBySuburb($suburb, $service_period = "")
-{
- if ($service_period == "") $service_period = service_period();
- global $conn;
- $query = "SELECT DISTINCT service_id,trips.route_id,route_short_name,route_long_name
+
+{
+ if ($service_period == "") $service_period = service_period();
+ 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
join routes on trips.route_id = routes.route_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";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":service_period", $service_period);
- $suburb = "%" . $suburb . ";%";
- $query->bindParam(":suburb", $suburb);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":service_period", $service_period);
+ $suburb = "%" . $suburb . ";%";
+ $query -> bindParam(":suburb", $suburb);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getRoutesNearby($lat, $lng, $limit = "", $distance = 500)
-{
- if ($service_period == "") $service_period = service_period();
- if ($limit != "") $limitSQL = " LIMIT :limit ";
- global $conn;
- $query = "SELECT service_id,trips.route_id,route_short_name,route_long_name,min(stops.stop_id) as stop_id,
+
+{
+ if ($service_period == "") $service_period = service_period();
+ if ($limit != "") $limitSQL = " LIMIT :limit ";
+ 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
FROM stop_times
join trips on trips.trip_id = stop_times.trip_id
@@ -215,16 +226,16 @@
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
order by distance $limitSQL";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":service_period", $service_period);
- $query->bindParam(":distance", $distance);
- if ($limit != "") $query->bindParam(":limit", $limit);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":service_period", $service_period);
+ $query -> bindParam(":distance", $distance);
+ if ($limit != "") $query -> bindParam(":limit", $limit);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
?>
--- a/include/db/servicealert-dao.inc.php
+++ b/include/db/servicealert-dao.inc.php
@@ -1,53 +1,167 @@
<?php
-function getServiceOverride($date="") {
- global $conn;
- $query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1";
- // debug($query,"database");
- $query = $conn->prepare($query); // Create a prepared statement
- $query->bindParam(":date", date("Ymd",($date != "" ? $date : time())));
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+function getServiceOverride($date = "")
+{
+ global $conn;
+ $query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1";
+ // debug($query,"database");
+ $query = $conn -> prepare($query); // Create a prepared statement
+ $query -> bindParam(":date", date("Ymd", ($date != "" ? $date : time())));
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
-function getCurrentAlerts() {
- global $conn;
- $query = "SELECT * from servicealerts_alerts";
- //debug($query, "database");
- $query = $conn->prepare($query);
- //if ($stop_sequence != "") $query->bindParam(":stop_sequence", $stop_sequence);
- $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 != "" && $filter_id != "") {
- $query .= " AND (informed_class = :informed_class OR informed_class = 'network') AND informed_id = :informed_id";
-
- }
- //debug($query, "database");
- $query = $conn->prepare($query);
- if ($filter_class != "" && $filter_id != "") {
- $query->bindParam(":informed_class", $filter_class);
- $query->bindParam(":informed_id", $filter_id);
- }
- $query->bindParam(":servicealert_id", $id);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+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;
+
+ }
?>
--- a/include/db/stop-dao.inc.php
+++ b/include/db/stop-dao.inc.php
@@ -1,131 +1,154 @@
<?php
function getStop($stopID)
-{
- global $conn;
- $query = "Select * from stops where stop_id = :stopID LIMIT 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":stopID", $stopID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+
+{
+ global $conn;
+ $query = "Select * from stops where stop_id = :stopID LIMIT 1";
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":stopID", $stopID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
function getStops($timingPointsOnly = false, $firstLetter = "", $startsWith = "")
-{
- global $conn;
- $conditions = Array();
- if ($timingPointsOnly) $conditions[] = "substr(stop_code,1,2) != 'Wj'";
- if ($firstLetter != "") $conditions[] = "substr(stop_name,1,1) = :firstLetter";
- if ($startsWith != "") $conditions[] = "stop_name like :startsWith";
- $query = "Select * from stops";
- if (sizeof($conditions) > 0) {
- if (sizeof($conditions) > 1) {
- $query.= " Where " . implode(" AND ", $conditions) . " ";
- }
- else {
- $query.= " Where " . $conditions[0] . " ";
- }
- }
- $query.= " order by stop_name;";
- $query = $conn->prepare($query);
- if ($firstLetter != "") $query->bindParam(":firstLetter", $firstLetter);
-
- if ($startsWith != "") {
- $startsWith = $startsWith."%";
- $query->bindParam(":startsWith", $startsWith);
- }
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+
+{
+ global $conn;
+ $conditions = Array();
+ if ($timingPointsOnly) $conditions[] = "substr(stop_code,1,2) != 'Wj'";
+ if ($firstLetter != "") $conditions[] = "substr(stop_name,1,1) = :firstLetter";
+ if ($startsWith != "") $conditions[] = "stop_name like :startsWith";
+ $query = "Select * from stops";
+ if (sizeof($conditions) > 0) {
+ if (sizeof($conditions) > 1) {
+ $query .= " Where " . implode(" AND ", $conditions) . " ";
+ }
+ else {
+ $query .= " Where " . $conditions[0] . " ";
+ }
+ }
+ $query .= " order by stop_name;";
+ $query = $conn -> prepare($query);
+ if ($firstLetter != "") $query -> bindParam(":firstLetter", $firstLetter);
+
+ if ($startsWith != "") {
+ $startsWith = $startsWith . "%";
+ $query -> bindParam(":startsWith", $startsWith);
+ }
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getNearbyStops($lat, $lng, $limit = "", $distance = 1000)
-{
- if ($lat == null || $lng == null) return Array();
- if ($limit != "") $limitSQL = " LIMIT :limit ";
- global $conn;
- $query = "Select *, ST_Distance(position, ST_GeographyFromText('SRID=4326;POINT($lng $lat)'), FALSE) as distance
+
+{
+ if ($lat == null || $lng == null) return Array();
+ if ($limit != "") $limitSQL = " LIMIT :limit ";
+ 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)
order by distance $limitSQL;";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":distance", $distance);
- $query->bindParam(":limit", $limit);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":distance", $distance);
+ $query -> bindParam(":limit", $limit);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ 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)
-{
- global $conn;
- $query = "Select * from stops where zone_id LIKE :suburb order by stop_name;";
- debug($query, "database");
- $query = $conn->prepare($query);
- $suburb = "%" . $suburb . ";%";
- $query->bindParam(":suburb", $suburb);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
-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";
-
- debug($query, "database");
- $query = $conn->prepare($query);
-
- $query->bindParam(":stop_code", $stop_code);
- $stop_code2 = $stop_code . "%";
- $query->bindParam(":stop_code2", $stop_code2);
- if ($startsWith != "") {
- $startsWith = $startsWith."%";
- $query->bindParam(":startsWith", $startsWith);
- }
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+
+{
+ global $conn;
+ $query = "Select * from stops where zone_id LIKE :suburb order by stop_name;";
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $suburb = "%" . $suburb . ";%";
+ $query -> bindParam(":suburb", $suburb);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
+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";
+
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+
+ $query -> bindParam(":stop_code", $stop_code);
+ $stop_code2 = $stop_code . "%";
+ $query -> bindParam(":stop_code2", $stop_code2);
+ if ($startsWith != "") {
+ $startsWith = $startsWith . "%";
+ $query -> bindParam(":startsWith", $startsWith);
+ }
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getStopRoutes($stopID, $service_period)
-{
- if ($service_period == "") $service_period = service_period();
- global $conn;
- $query = "SELECT distinct service_id,trips.route_id,route_short_name,route_long_name
+
+{
+ if ($service_period == "") $service_period = service_period();
+ 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 join routes on trips.route_id = routes.route_id WHERE stop_id = :stopID AND service_id=:service_period";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":service_period", $service_period);
- $query->bindParam(":stopID", $stopID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":service_period", $service_period);
+ $query -> bindParam(":stopID", $stopID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function getStopTrips($stopID, $service_period = "", $afterTime = "", $limit = "")
-{
- if ($service_period == "") $service_period = service_period();
- if ($limit != "") $limitSQL = " LIMIT :limit ";
- global $conn;
- 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
+
+{
+ if ($service_period == "") $service_period = service_period();
+ if ($limit != "") $limitSQL = " LIMIT :limit ";
+ global $conn;
+ 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
join trips on trips.trip_id =
stop_times.trip_id
@@ -136,9 +159,9 @@
AND service_id=:service_period
AND end_times.arrival_time > :afterTime
ORDER BY end_time $limitSQL";
- }
- 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
+ }
+ 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
FROM stop_times
join trips on trips.trip_id =
stop_times.trip_id
@@ -146,45 +169,46 @@
WHERE stop_times.stop_id = :stopID
AND service_id=:service_period
ORDER BY arrival_time $limitSQL";
- }
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":service_period", $service_period);
- $query->bindParam(":stopID", $stopID);
- if ($limit != "") $query->bindParam(":limit", $limit);
- if ($afterTime != "") $query->bindParam(":afterTime", $afterTime);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+ }
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":service_period", $service_period);
+ $query -> bindParam(":stopID", $stopID);
+ if ($limit != "") $query -> bindParam(":limit", $limit);
+ if ($afterTime != "") $query -> bindParam(":afterTime", $afterTime);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
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 ($time == "") $time = current_time();
- if ($limit == "") $limit = 10;
- $trips = getStopTrips($stopID, $service_period, $time);
- $timedTrips = Array();
- if ($trips && sizeof($trips) > 0) {
- foreach ($trips as $trip) {
- if ($trip['arrival_time'] != "") {
- 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']);
- if ($timedTrip['arrival_time'] > $time and strtotime($timedTrip['arrival_time']) < (strtotime($time) + $time_range)) {
- $timedTrips[] = $timedTrip;
- }
- }
- if (sizeof($timedTrips) > $limit) break;
- }
- sktimesort($timedTrips, "arrival_time", true);
- }
- return $timedTrips;
-}
+
+{
+ if ($service_period == "") $service_period = service_period();
+ if ($time_range == "") $time_range = (24 * 60 * 60);
+ if ($time == "") $time = current_time();
+ if ($limit == "") $limit = 10;
+ $trips = getStopTrips($stopID, $service_period, $time);
+ $timedTrips = Array();
+ if ($trips && sizeof($trips) > 0) {
+ foreach ($trips as $trip) {
+ if ($trip['arrival_time'] != "") {
+ 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']);
+ if ($timedTrip['arrival_time'] > $time and strtotime($timedTrip['arrival_time']) < (strtotime($time) + $time_range)) {
+ $timedTrips[] = $timedTrip;
+ }
+ }
+ if (sizeof($timedTrips) > $limit) break;
+ }
+ sktimesort($timedTrips, "arrival_time", true);
+ }
+ return $timedTrips;
+ }
?>
--- a/include/db/trip-dao.inc.php
+++ b/include/db/trip-dao.inc.php
@@ -1,224 +1,251 @@
<?php
function getTrip($tripID)
-{
- global $conn;
- $query = "Select * from trips
+
+{
+ global $conn;
+ $query = "Select * from trips
join routes on trips.route_id = routes.route_id
where trip_id = :tripID
LIMIT 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":tripID", $tripID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":tripID", $tripID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
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,
stop_sequence, trips.trip_id
FROM stop_times
join trips on trips.trip_id = stop_times.trip_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";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":tripID", $tripID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchColumn(0);
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":tripID", $tripID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchColumn(0);
+ }
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
FROM stop_times
join trips on trips.trip_id = stop_times.trip_id
join routes on trips.route_id = routes.route_id
join stops on stops.stop_id = stop_times.stop_id
WHERE trips.trip_id = :tripID $range ORDER BY stop_sequence";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":tripID", $tripID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- $stopTimes = $query->fetchAll();
- $cur_timepoint = Array();
- $next_timepoint = Array();
- $distance_between_timepoints = 0.0;
- $distance_traveled_between_timepoints = 0.0;
- $rv = Array();
- foreach ($stopTimes as $i => $stopTime) {
- if ($stopTime['arrival_time'] != "") {
- // is timepoint
- $cur_timepoint = $stopTime;
- $distance_between_timepoints = 0.0;
- $distance_traveled_between_timepoints = 0.0;
- if ($i + 1 < sizeof($stopTimes)) {
- $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"]);
- while ($stopTimes[$k]["arrival_time"] == "" && $k + 1 < sizeof($stopTimes)) {
- $k+= 1;
- //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"]);
- }
- $next_timepoint = $stopTimes[$k];
-
- }
- $rv[] = $stopTime;
- }
- else {
- // is untimed point
- //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"]);
- //echo "$distance_traveled_between_timepoints / $distance_between_timepoints<br>";
- $distance_percent = $distance_traveled_between_timepoints / $distance_between_timepoints;
- if ($next_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>";
- $time_estimate = ($distance_percent * $total_time) + strtotime($cur_timepoint["arrival_time"]);
- $stopTime["arrival_time"] = date("H:i:s", $time_estimate);
- }
- else {
- $stopTime["arrival_time"] = $cur_timepoint["arrival_time"];
- }
- $rv[] = $stopTime;
-
-
- }
- }
- //var_dump($rv);
- return $rv;
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":tripID", $tripID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ $stopTimes = $query -> fetchAll();
+ $cur_timepoint = Array();
+ $next_timepoint = Array();
+ $distance_between_timepoints = 0.0;
+ $distance_traveled_between_timepoints = 0.0;
+ $rv = Array();
+ foreach ($stopTimes as $i => $stopTime) {
+ if ($stopTime['arrival_time'] != "") {
+ // is timepoint
+ $cur_timepoint = $stopTime;
+ $distance_between_timepoints = 0.0;
+ $distance_traveled_between_timepoints = 0.0;
+ if ($i + 1 < sizeof($stopTimes)) {
+ $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"]);
+ while ($stopTimes[$k]["arrival_time"] == "" && $k + 1 < sizeof($stopTimes)) {
+ $k += 1;
+ // 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"]);
+ }
+ $next_timepoint = $stopTimes[$k];
+
+ }
+ $rv[] = $stopTime;
+ }
+ else {
+ // is untimed point
+ // 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"]);
+ // echo "$distance_traveled_between_timepoints / $distance_between_timepoints<br>";
+ $distance_percent = $distance_traveled_between_timepoints / $distance_between_timepoints;
+ if ($next_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>";
+ $time_estimate = ($distance_percent * $total_time) + strtotime($cur_timepoint["arrival_time"]);
+ $stopTime["arrival_time"] = date("H:i:s", $time_estimate);
+ }
+ else {
+ $stopTime["arrival_time"] = $cur_timepoint["arrival_time"];
+ }
+ $rv[] = $stopTime;
+
+
+ }
+ }
+ // var_dump($rv);
+ return $rv;
+ }
function getTripPreviousTimePoint($tripID, $stop_sequence)
-{
- global $conn;
- $query = " SELECT trip_id,stop_id,
+
+{
+ global $conn;
+ $query = " SELECT trip_id,stop_id,
stop_sequence
FROM stop_times
WHERE trip_id = :tripID and stop_sequence < :stop_sequence
and stop_times.arrival_time IS NOT NULL ORDER BY stop_sequence DESC LIMIT 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":tripID", $tripID);
- $query->bindParam(":stop_sequence", $stop_sequence);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":tripID", $tripID);
+ $query -> bindParam(":stop_sequence", $stop_sequence);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
function getTripNextTimePoint($tripID, $stop_sequence)
-{
- global $conn;
- $query = " SELECT trip_id,stop_id,
+
+{
+ global $conn;
+ $query = " SELECT trip_id,stop_id,
stop_sequence
FROM stop_times
WHERE trip_id = :tripID and stop_sequence > :stop_sequence
and stop_times.arrival_time IS NOT NULL ORDER BY stop_sequence LIMIT 1";
- debug($query, "database");
- $query = $conn->prepare($query);
- $query->bindParam(":tripID", $tripID);
- $query->bindParam(":stop_sequence", $stop_sequence);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetch(PDO::FETCH_ASSOC);
-}
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":tripID", $tripID);
+ $query -> bindParam(":stop_sequence", $stop_sequence);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetch(PDO :: FETCH_ASSOC);
+ }
function getTimeInterpolatedTripAtStop($tripID, $stop_sequence)
-{
- global $conn;
- // limit interpolation to between nearest actual points.
- $prevTimePoint = getTripPreviousTimePoint($tripID, $stop_sequence);
- $nextTimePoint = getTripNextTimePoint($tripID, $stop_sequence);
- //echo " prev {$lowestDelta['stop_sequence']} next {$nextTimePoint['stop_sequence']} ";
- $range = "";
- if ($prevTimePoint != "") $range .= " AND stop_sequence >= '{$prevTimePoint['stop_sequence']}'";
- if ($nextTimePoint != "") $range .= " AND stop_sequence <= '{$nextTimePoint['stop_sequence']}'";
- foreach (getTimeInterpolatedTrip($tripID, $range) as $tripStop) {
- if ($tripStop['stop_sequence'] == $stop_sequence) return $tripStop;
- }
- return Array();
-}
+
+{
+ global $conn;
+ // limit interpolation to between nearest actual points.
+ $prevTimePoint = getTripPreviousTimePoint($tripID, $stop_sequence);
+ $nextTimePoint = getTripNextTimePoint($tripID, $stop_sequence);
+ // echo " prev {$lowestDelta['stop_sequence']} next {$nextTimePoint['stop_sequence']} ";
+ $range = "";
+ if ($prevTimePoint != "") $range .= " AND stop_sequence >= '{$prevTimePoint['stop_sequence']}'";
+ if ($nextTimePoint != "") $range .= " AND stop_sequence <= '{$nextTimePoint['stop_sequence']}'";
+ foreach (getTimeInterpolatedTrip($tripID, $range) as $tripStop) {
+ if ($tripStop['stop_sequence'] == $stop_sequence) return $tripStop;
+ }
+ return Array();
+ }
function getTripStartTime($tripID)
-{
- global $conn;
- $query = "Select * from stop_times
+
+{
+ global $conn;
+ $query = "Select * from stop_times
where trip_id = :tripID
AND arrival_time IS NOT NULL
AND stop_sequence = '1'";
- 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'];
-}
+ 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 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)
-{
- global $conn;
- 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
+
+{
+ global $conn;
+ 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
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");
- $query = $conn->prepare($query);
- $query->bindParam(":time", $time);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
-function viaPoints($tripID, $stop_sequence = "")
-{
- global $conn;
- $query = "SELECT stops.stop_id, stop_name, arrival_time
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ $query -> bindParam(":time", $time);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
+function viaPoints($tripID, $stop_sequence = "", $timing_points_only = true)
+
+{
+ global $conn;
+ $query = "SELECT stops.stop_id, stop_name, arrival_time
FROM stop_times join stops on stops.stop_id = stop_times.stop_id
WHERE stop_times.trip_id = :tripID
-" . ($stop_sequence != "" ? " AND stop_sequence > :stop_sequence " : "") . "AND substr(stop_code,1,2) != 'Wj' ORDER BY stop_sequence";
- debug($query, "database");
- $query = $conn->prepare($query);
- if ($stop_sequence != "") $query->bindParam(":stop_sequence", $stop_sequence);
- $query->bindParam(":tripID", $tripID);
- $query->execute();
- if (!$query) {
- databaseError($conn->errorInfo());
- return Array();
- }
- return $query->fetchAll();
-}
+" . ($stop_sequence != "" ? " AND stop_sequence > :stop_sequence " : "") . ($timing_points_only ? "AND substr(stop_code,1,2) != 'Wj' ": ""). " ORDER BY stop_sequence";
+ debug($query, "database");
+ $query = $conn -> prepare($query);
+ if ($stop_sequence != "") $query -> bindParam(":stop_sequence", $stop_sequence);
+ $query -> bindParam(":tripID", $tripID);
+ $query -> execute();
+ if (!$query) {
+ databaseError($conn -> errorInfo());
+ return Array();
+ }
+ return $query -> fetchAll();
+ }
function viaPointNames($tripid, $stop_sequence = "")
-{
- $viaPointNames = Array();
- foreach (viaPoints($tripid, $stop_sequence) as $point) {
- $viaPointNames[] = $point['stop_name'];
- }
- if (sizeof($viaPointNames) > 0) {
- return r_implode(", ", $viaPointNames);
- }
- else {
- return "";
- }
-}
+
+{
+ $viaPointNames = Array();
+ foreach (viaPoints($tripid, $stop_sequence) as $point) {
+ $viaPointNames[] = $point['stop_name'];
+ }
+ if (sizeof($viaPointNames) > 0) {
+ return r_implode(", ", $viaPointNames);
+ }
+ else {
+ return "";
+ }
+ }
?>
--- a/index.php
+++ b/index.php
@@ -24,7 +24,6 @@
<li><a class="nearby" href="routeList.php?nearby=yes">Nearby Routes</a></li>
</ul>
<?php
-echo timePlaceSettings();
echo ' <a href="labs/index.php" data-role="button" data-icon="beaker">Busness R&D</a>';
include_footer(true)
?>
--- /dev/null
+++ b/js/LAB.min.js
@@ -1,1 +1,5 @@
-
+/*! 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);
--- a/js/flotr/flotr-0.2.0-alpha.js
+++ /dev/null
@@ -1,2 +1,1 @@
-//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:"+B.legend.labelBoxHeight+"px;background-color:"+H[R].color+'"></div></div></td><td class="flotr-legend-label">'+E+"</td>")}if(A){b.push("</tr>")}if(b.length>0){var V='<table style="font-size:smaller;color:'+B.grid.color+'">'+b.join("")+"</table>";if(B.legend.container!=null){$(B.legend.container).update(V)}else{var D="";var M=B.legend.position,N=B.legend.margin;if(M.charAt(0)=="n"){D+="top:"+(N+I.top)+"px;"}else{if(M.charAt(0)=="s"){D+="bottom:"+(N+I.bottom)+"px;"}}if(M.charAt(1)=="e"){D+="right:"+(N+I.right)+"px;"}else{if(M.charAt(1)=="w"){D+="left:"+(N+I.left)+"px;"}}var J=this.el.insert('<div class="flotr-legend" style="position:absolute;z-index:2;'+D+'">'+V+"</div>").select("div.flotr-legend").first();if(B.legend.backgroundOpacity!=0){var Y=B.legend.backgroundColor;if(Y==null){var X=(B.grid.backgroundColor!=null)?B.grid.backgroundColor:Flotr.extractColor(J);Y=Flotr.parseColor(X).adjust(null,null,null,1).toString()}this.el.insert('<div class="flotr-legend-bg" style="position:absolute;width:'+J.getWidth()+"px;height:"+J.getHeight()+"px;"+D+"background-color:"+Y+';"> </div>').select("div.flotr-legend-bg").first().setStyle({opacity:B.legend.backgroundOpacity})}}}}}},getEventPosition:function(C){var G=this.overlay.cumulativeOffset(),F=(C.pageX-G.left-this.plotOffset.left),E=(C.pageY-G.top-this.plotOffset.top),D=0,B=0;if(C.pageX==null&&C.clientX!=null){var H=document.documentElement,A=document.body;D=C.clientX+(H&&H.scrollLeft||A.scrollLeft||0);B=C.clientY+(H&&H.scrollTop||A.scrollTop||0)}else{D=C.pageX;B=C.pageY}return{x:this.axes.x.min+F/this.axes.x.scale,x2:this.axes.x2.min+F/this.axes.x2.scale,y:this.axes.y.max-E/this.axes.y.scale,y2:this.axes.y2.max-E/this.axes.y2.scale,relX:F,relY:E,absX:D,absY:B}},clickHandler:function(A){if(this.ignoreClick){this.ignoreClick=false;return }this.el.fire("flotr:click",[this.getEventPosition(A),this])},mouseMoveHandler:function(A){var B=this.getEventPosition(A);this.lastMousePos.pageX=B.absX;this.lastMousePos.pageY=B.absY;if(this.selectionInterval==null&&(this.options.mouse.track||this.series.any(function(C){return C.mouse&&C.mouse.track}))){this.hit(B)}this.el.fire("flotr:mousemove",[A,B,this])},mouseDownHandler:function(C){if(C.isRightClick()){C.stop();var B=this.overlay;B.hide();function A(){B.show();$(document).stopObserving("mousemove",A)}$(document).observe("mousemove",A);return }if(!this.options.selection.mode||!C.isLeftClick()){return }this.setSelectionPos(this.selection.first,C);if(this.selectionInterval!=null){clearInterval(this.selectionInterval)}this.lastMousePos.pageX=null;this.selectionInterval=setInterval(this.updateSelection.bind(this),1000/this.options.selection.fps);this.mouseUpHandler=this.mouseUpHandler.bind(this);$(document).observe("mouseup",this.mouseUpHandler)},fireSelectEvent:function(){var A=this.axes,F=this.selection,C=(F.first.x<=F.second.x)?F.first.x:F.second.x,B=(F.first.x<=F.second.x)?F.second.x:F.first.x,E=(F.first.y>=F.second.y)?F.first.y:F.second.y,D=(F.first.y>=F.second.y)?F.second.y:F.first.y;C=A.x.min+C/A.x.scale;B=A.x.min+B/A.x.scale;E=A.y.max-E/A.y.scale;D=A.y.max-D/A.y.scale;this.el.fire("flotr:select",[{x1:C,y1:E,x2:B,y2:D},this])},mouseUpHandler:function(A){$(document).stopObserving("mouseup",this.mouseUpHandler);A.stop();if(this.selectionInterval!=null){clearInterval(this.selectionInterval);this.selectionInterval=null}this.setSelectionPos(this.selection.second,A);this.clearSelection();if(this.selectionIsSane()){this.drawSelection();this.fireSelectEvent();this.ignoreClick=true}},setSelectionPos:function(D,B){var A=this.options,C=$(this.overlay).cumulativeOffset();if(A.selection.mode.indexOf("x")==-1){D.x=(D==this.selection.first)?0:this.plotWidth}else{D.x=B.pageX-C.left-this.plotOffset.left;D.x=Math.min(Math.max(0,D.x),this.plotWidth)}if(A.selection.mode.indexOf("y")==-1){D.y=(D==this.selection.first)?0:this.plotHeight}else{D.y=B.pageY-C.top-this.plotOffset.top;D.y=Math.min(Math.max(0,D.y),this.plotHeight)}},updateSelection:function(){if(this.lastMousePos.pageX==null){return }this.setSelectionPos(this.selection.second,this.lastMousePos);this.clearSelection();if(this.selectionIsSane()){this.drawSelection()}},clearSelection:function(){if(this.prevSelection==null){return }var G=this.prevSelection,E=this.octx,C=this.plotOffset,A=Math.min(G.first.x,G.second.x),F=Math.min(G.first.y,G.second.y),B=Math.abs(G.second.x-G.first.x),D=Math.abs(G.second.y-G.first.y);E.clearRect(A+C.left-E.lineWidth,F+C.top-E.lineWidth,B+E.lineWidth*2,D+E.lineWidth*2);this.prevSelection=null},setSelection:function(G){var B=this.options,H=this.axes.x,A=this.axes.y,F=yaxis.scale,D=xaxis.scale,E=B.selection.mode.indexOf("x")!=-1,C=B.selection.mode.indexOf("y")!=-1;this.clearSelection();this.selection.first.y=E?0:(A.max-G.y1)*F;this.selection.second.y=E?this.plotHeight:(A.max-G.y2)*F;this.selection.first.x=C?0:(G.x1-H.min)*D;this.selection.second.x=C?this.plotWidth:(G.x2-H.min)*D;this.drawSelection();this.fireSelectEvent()},drawSelection:function(){var C=this.prevSelection,F=this.selection,H=this.octx,I=this.options,A=this.plotOffset;if(C!=null&&F.first.x==C.first.x&&F.first.y==C.first.y&&F.second.x==C.second.x&&F.second.y==C.second.y){return }H.strokeStyle=Flotr.parseColor(I.selection.color).scale(null,null,null,0.8).toString();H.lineWidth=1;H.lineJoin="round";H.fillStyle=Flotr.parseColor(I.selection.color).scale(null,null,null,0.4).toString();this.prevSelection={first:{x:F.first.x,y:F.first.y},second:{x:F.second.x,y:F.second.y}};var E=Math.min(F.first.x,F.second.x),D=Math.min(F.first.y,F.second.y),G=Math.abs(F.second.x-F.first.x),B=Math.abs(F.second.y-F.first.y);H.fillRect(E+A.left,D+A.top,G,B);H.strokeRect(E+A.left,D+A.top,G,B)},selectionIsSane:function(){var A=this.selection;return Math.abs(A.second.x-A.first.x)>=5&&Math.abs(A.second.y-A.first.y)>=5},clearHit:function(){if(this.prevHit){var B=this.options,A=this.plotOffset,C=this.prevHit;this.octx.clearRect(this.tHoz(C.x)+A.left-B.points.radius*2,this.tVert(C.y)+A.top-B.points.radius*2,B.points.radius*3+B.points.lineWidth*3,B.points.radius*3+B.points.lineWidth*3);this.prevHit=null}},hit:function(I){var G=this.series,C=this.options,R=this.prevHit,H=this.plotOffset,D=this.octx,S,A,M,Q,L={dist:Number.MAX_VALUE,x:null,y:null,relX:I.relX,relY:I.relY,absX:I.absX,absY:I.absY,mouse:null};for(Q=0;Q<G.length;Q++){s=G[Q];if(!s.mouse.track){continue}S=s.data;A=(s.xaxis.scale*s.mouse.sensibility);M=(s.yaxis.scale*s.mouse.sensibility);for(var P=0,B,E;P<S.length;P++){if(S[P][1]===null){continue}B=Math.pow(s.xaxis.scale*(S[P][0]-I.x),2);E=Math.pow(s.yaxis.scale*(S[P][1]-I.y),2);if(B<A&&E<M&&Math.sqrt(B+E)<L.dist){L.dist=Math.sqrt(B+E);L.x=S[P][0];L.y=S[P][1];L.mouse=s.mouse}}}if(L.mouse&&L.mouse.track&&!R||(R&&(L.x!=R.x||L.y!=R.y))){var K=this.mouseTrack||this.el.select(".flotr-mouse-value")[0],F="",J=C.mouse.position,N=C.mouse.margin,O="opacity:0.7;background-color:#000;color:#fff;display:none;position:absolute;padding:2px 8px;-moz-border-radius:4px;border-radius:4px;white-space:nowrap;";if(!C.mouse.relative){if(J.charAt(0)=="n"){F+="top:"+(N+H.top)+"px;"}else{if(J.charAt(0)=="s"){F+="bottom:"+(N+H.bottom)+"px;"}}if(J.charAt(1)=="e"){F+="right:"+(N+H.right)+"px;"}else{if(J.charAt(1)=="w"){F+="left:"+(N+H.left)+"px;"}}}else{if(J.charAt(0)=="n"){F+="bottom:"+(N-H.top-this.tVert(L.y)+this.canvasHeight)+"px;"}else{if(J.charAt(0)=="s"){F+="top:"+(N+H.top+this.tVert(L.y))+"px;"}}if(J.charAt(1)=="e"){F+="left:"+(N+H.left+this.tHoz(L.x))+"px;"}else{if(J.charAt(1)=="w"){F+="right:"+(N-H.left-this.tHoz(L.x)+this.canvasWidth)+"px;"}}}O+=F;if(!K){this.el.insert('<div class="flotr-mouse-value" style="'+O+'"></div>');K=this.mouseTrack=this.el.select(".flotr-mouse-value").first()}else{this.mouseTrack=K.setStyle(O)}if(L.x!==null&&L.y!==null){K.show();this.clearHit();if(L.mouse.lineColor!=null){D.save();D.translate(H.left,H.top);D.lineWidth=C.points.lineWidth;D.strokeStyle=L.mouse.lineColor;D.fillStyle="#ffffff";D.beginPath();D.arc(this.tHoz(L.x),this.tVert(L.y),C.mouse.radius,0,2*Math.PI,true);D.fill();D.stroke();D.restore()}this.prevHit=L;var T=L.mouse.trackDecimals;if(T==null||T<0){T=0}K.innerHTML=L.mouse.trackFormatter({x:L.x.toFixed(T),y:L.y.toFixed(T)});K.fire("flotr:hit",[L,this])}else{if(R){K.hide();this.clearHit()}}}},saveImage:function(D,C,A,B){var E=null;switch(D){case"jpeg":case"jpg":E=Canvas2Image.saveAsJPEG(this.canvas,B,C,A);break;default:case"png":E=Canvas2Image.saveAsPNG(this.canvas,B,C,A);break;case"bmp":E=Canvas2Image.saveAsBMP(this.canvas,B,C,A);break}if(Object.isElement(E)&&B){this.restoreCanvas();this.canvas.hide();this.overlay.hide();this.el.insert(E.setStyle({position:"absolute"}))}},restoreCanvas:function(){this.canvas.show();this.overlay.show();this.el.select("img").invoke("remove")}});Flotr.Color=Class.create({initialize:function(E,D,B,C){this.rgba=["r","g","b","a"];var A=4;while(-1<--A){this[this.rgba[A]]=arguments[A]||((A==3)?1:0)}this.normalize()},adjust:function(D,C,E,B){var A=4;while(-1<--A){if(arguments[A]!=null){this[this.rgba[A]]+=arguments[A]}}return this.normalize()},clone:function(){return new Flotr.Color(this.r,this.b,this.g,this.a)},limit:function(B,A,C){return Math.max(Math.min(B,C),A)},normalize:function(){var A=this.limit;this.r=A(parseInt(this.r),0,255);this.g=A(parseInt(this.g),0,255);this.b=A(parseInt(this.b),0,255);this.a=A(this.a,0,1);return this},scale:function(D,C,E,B){var A=4;while(-1<--A){if(arguments[A]!=null){this[this.rgba[A]]*=arguments[A]}}return this.normalize()},distance:function(B){if(!B){return }B=new Flotr.parseColor(B);var C=0;var A=3;while(-1<--A){C+=Math.abs(this[this.rgba[A]]-B[this.rgba[A]])}return C},toString:function(){return(this.a>=1)?"rgb("+[this.r,this.g,this.b].join(",")+")":"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"}});Flotr.Color.lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};Flotr.Date={format:function(F,E){if(!F){return }var A=function(H){H=H.toString();return H.length==1?"0"+H:H};var D=[];var C=false;for(var B=0;B<E.length;++B){var G=E.charAt(B);if(C){switch(G){case"h":G=F.getUTCHours().toString();break;case"H":G=A(F.getUTCHours());break;case"M":G=A(F.getUTCMinutes());break;case"S":G=A(F.getUTCSeconds());break;case"d":G=F.getUTCDate().toString();break;case"m":G=(F.getUTCMonth()+1).toString();break;case"y":G=F.getUTCFullYear().toString();break;case"b":G=Flotr.Date.monthNames[F.getUTCMonth()];break}D.push(G);C=false}else{if(G=="%"){C=true}else{D.push(G)}}}return D.join("")},timeUnits:{second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000},spec:[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};
+
--- a/js/flotr/flotr.debug-0.2.0-alpha_radar1.js
+++ /dev/null
@@ -1,3349 +1,1 @@
-//Flotr 0.2.0-alpha Copyright (c) 2009 Bas Wenneker, <http://solutoire.com>, MIT License.
-//
-//Radar chart added by Ryan Simmons
-//
-/* $Id: flotr.js 82 2009-01-12 19:19:31Z fabien.menager $ */
-
-var Flotr = {
- version: '0.2.0-alpha',
- author: 'Bas Wenneker',
- website: 'http://www.solutoire.com',
- /**
- * An object of the default registered graph types. Use Flotr.register(type, functionName)
- * to add your own type.
- */
- _registeredTypes:{
- 'lines': 'drawSeriesLines',
- 'points': 'drawSeriesPoints',
- 'bars': 'drawSeriesBars',
- 'candles': 'drawSeriesCandles',
- 'pie': 'drawSeriesPie',
- 'radar':'drawSeriesRadar'
- },
- /**
- * Can be used to register your own chart type. Default types are 'lines', 'points' and 'bars'.
- * This is still experimental.
- * @todo Test and confirm.
- * @param {String} type - type of chart, like 'pies', 'bars' etc.
- * @param {String} functionName - Name of the draw function, like 'drawSeriesPies', 'drawSeriesBars' etc.
- */
- register: function(type, functionName){
- Flotr._registeredTypes[type] = functionName+'';
- },
- /**
- * Draws the graph. This function is here for backwards compatibility with Flotr version 0.1.0alpha.
- * You could also draw graphs by directly calling Flotr.Graph(element, data, options).
- * @param {Element} el - element to insert the graph into
- * @param {Object} data - an array or object of dataseries
- * @param {Object} options - an object containing options
- * @param {Class} _GraphKlass_ - (optional) Class to pass the arguments to, defaults to Flotr.Graph
- * @return {Class} returns a new graph object and of course draws the graph.
- */
- draw: function(el, data, options, _GraphKlass_){
- _GraphKlass_ = _GraphKlass_ || Flotr.Graph;
- return new _GraphKlass_(el, data, options);
- },
- /**
- * Collects dataseries from input and parses the series into the right format. It returns an Array
- * of Objects each having at least the 'data' key set.
- * @param {Array/Object} data - Object or array of dataseries
- * @return {Array} Array of Objects parsed into the right format ({(...,) data: [[x1,y1], [x2,y2], ...] (, ...)})
- */
- getSeries: function(data){
- return data.collect(function(serie){
- var i, serie = (serie.data) ? Object.clone(serie) : {'data': serie};
- for (i = serie.data.length-1; i > -1; --i) {
- serie.data[i][1] = (serie.data[i][1] === null ? null : parseFloat(serie.data[i][1]));
- }
- return serie;
- });
- },
- /**
- * Recursively merges two objects.
- * @param {Object} src - source object (likely the object with the least properties)
- * @param {Object} dest - destination object (optional, object with the most properties)
- * @return {Object} recursively merged Object
- */
- merge: function(src, dest){
- var result = dest || {};
- for(var i in src){
- result[i] = (src[i] != null && typeof(src[i]) == 'object' && !(src[i].constructor == Array || src[i].constructor == RegExp) && !Object.isElement(src[i])) ? Flotr.merge(src[i], dest[i]) : result[i] = src[i];
- }
- return result;
- },
- /**
- * Function calculates the ticksize and returns it.
- * @param {Integer} noTicks - number of ticks
- * @param {Integer} min - lower bound integer value for the current axis
- * @param {Integer} max - upper bound integer value for the current axis
- * @param {Integer} decimals - number of decimals for the ticks
- * @return {Integer} returns the ticksize in pixels
- */
- getTickSize: function(noTicks, min, max, decimals){
- var delta = (max - min) / noTicks;
- var magn = Flotr.getMagnitude(delta);
-
- // Norm is between 1.0 and 10.0.
- var norm = delta / magn;
-
- var tickSize = 10;
- if(norm < 1.5) tickSize = 1;
- else if(norm < 2.25) tickSize = 2;
- else if(norm < 3) tickSize = ((decimals == 0) ? 2 : 2.5);
- else if(norm < 7.5) tickSize = 5;
-
- return tickSize * magn;
- },
- /**
- * Default tick formatter.
- * @param {String/Integer} val - tick value integer
- * @return {String} formatted tick string
- */
- defaultTickFormatter: function(val){
- return val+'';
- },
- /**
- * Formats the mouse tracker values.
- * @param {Object} obj - Track value Object {x:..,y:..}
- * @return {String} Formatted track string
- */
- defaultTrackFormatter: function(obj){
- return '('+obj.x+', '+obj.y+')';
- },
- defaultPieLabelFormatter: function(slice) {
- return (slice.fraction*100).toFixed(2)+'%';
- },
- /**
- * Returns the magnitude of the input value.
- * @param {Integer/Float} x - integer or float value
- * @return {Integer/Float} returns the magnitude of the input value
- */
- getMagnitude: function(x){
- return Math.pow(10, Math.floor(Math.log(x) / Math.LN10));
- },
- toPixel: function(val){
- return Math.floor(val)+0.5;//((val-Math.round(val) < 0.4) ? (Math.floor(val)-0.5) : val);
- },
- toRad: function(angle){
- return -angle * (Math.PI/180);
- },
- /**
- * Parses a color string and returns a corresponding Color.
- * @param {String} str - string thats representing a color
- * @return {Color} returns a Color object or false
- */
- parseColor: function(str){
- if (str instanceof Flotr.Color) return str;
-
- var result, Color = Flotr.Color;
-
- // rgb(num,num,num)
- if((result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str)))
- return new Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]));
-
- // rgba(num,num,num,num)
- if((result = /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(str)))
- return new Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]), parseFloat(result[4]));
-
- // rgb(num%,num%,num%)
- if((result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str)))
- return new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55);
-
- // rgba(num%,num%,num%,num)
- if((result = /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(str)))
- return new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, parseFloat(result[4]));
-
- // #a0b1c2
- if((result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)))
- return new Color(parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16));
-
- // #fff
- if((result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)))
- return new Color(parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16));
-
- // Otherwise, we're most likely dealing with a named color.
- var name = str.strip().toLowerCase();
- if(name == 'transparent'){
- return new Color(255, 255, 255, 0);
- }
- return ((result = Color.lookupColors[name])) ? new Color(result[0], result[1], result[2]) : false;
- },
- /**
- * Extracts the background-color of the passed element.
- * @param {Element} element
- * @return {String} color string
- */
- extractColor: function(element){
- var color;
- // Loop until we find an element with a background color and stop when we hit the body element.
- do {
- color = element.getStyle('background-color').toLowerCase();
- if(!(color == '' || color == 'transparent')) break;
- element = element.up(0);
- } while(!element.nodeName.match(/^body$/i));
-
- // Catch Safari's way of signaling transparent.
- return (color == 'rgba(0, 0, 0, 0)') ? 'transparent' : color;
- }
-};
-/**
- * Flotr Graph class that plots a graph on creation.
-
- */
-Flotr.Graph = Class.create({
- /**
- * Flotr Graph constructor.
- * @param {Element} el - element to insert the graph into
- * @param {Object} data - an array or object of dataseries
- * @param {Object} options - an object containing options
- */
- initialize: function(el, data, options){
- this.el = $(el);
-
- if (!this.el) throw 'The target container doesn\'t exist';
-
- this.data = data;
- this.series = Flotr.getSeries(data);
- this.setOptions(options);
-
- // Initialize some variables
- 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;
-
- // Create and prepare canvas.
- this.constructCanvas();
-
- // Add event handlers for mouse tracking, clicking and selection
- 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();
-
- // Graph and Data tabs
- if (this.options.spreadsheet.show)
- this.constructTabs();
- },
- /**
- * Sets options and initializes some variables and color specific values, used by the constructor.
- * @param {Object} opts - options object
- */
- setOptions: function(opts){
- var options = {
- colors: ['#00A8F0', '#C0D800', '#CB4B4B', '#4DA74D', '#9440ED'], //=> The default colorscheme. When there are > 5 series, additional colors are generated.
- title: null,
- subtitle: null,
- legend: {
- show: true, // => setting to true will show the legend, hide otherwise
- noColumns: 1, // => number of colums in legend table // @todo: doesn't work for HtmlText = false
- labelFormatter: Prototype.K, // => fn: string -> string
- labelBoxBorderColor: '#CCCCCC', // => border color for the little label boxes
- labelBoxWidth: 14,
- labelBoxHeight: 10,
- labelBoxMargin: 5,
- container: null, // => container (as jQuery object) to put legend in, null means default on top of graph
- position: 'nw', // => position of default legend container within plot
- margin: 5, // => distance from grid edge to default legend container within plot
- backgroundColor: null, // => null means auto-detect
- backgroundOpacity: 0.85// => set to 0 to avoid background, set to 1 for a solid background
- },
- xaxis: {
- ticks: null, // => format: either [1, 3] or [[1, 'a'], 3]
- showLabels: true, // => setting to true will show the axis ticks labels, hide otherwise
- labelsAngle: 0, // => Labels' angle, in degrees
- title: null, // => axis title
- titleAngle: 0, // => axis title's angle, in degrees
- noTicks: 5, // => number of ticks for automagically generated ticks
- tickFormatter: Flotr.defaultTickFormatter, // => fn: number -> string
- tickDecimals: null, // => no. of decimals, null means auto
- min: null, // => min. value to show, null means set automatically
- max: null, // => max. value to show, null means set automatically
- autoscaleMargin: 0, // => margin in % to add if auto-setting min/max
- color: null
- },
- x2axis: {},
- yaxis: {
- ticks: null, // => format: either [1, 3] or [[1, 'a'], 3]
- showLabels: true, // => setting to true will show the axis ticks labels, hide otherwise
- labelsAngle: 0, // => Labels' angle, in degrees
- title: null, // => axis title
- titleAngle: 90, // => axis title's angle, in degrees
- noTicks: 5, // => number of ticks for automagically generated ticks
- tickFormatter: Flotr.defaultTickFormatter, // => fn: number -> string
- tickDecimals: null, // => no. of decimals, null means auto
- min: null, // => min. value to show, null means set automatically
- max: null, // => max. value to show, null means set automatically
- autoscaleMargin: 0, // => margin in % to add if auto-setting min/max
- color: null
- },
- y2axis: {
- titleAngle: 270
- },
- points: {
- show: false, // => setting to true will show points, false will hide
- radius: 3, // => point radius (pixels)
- lineWidth: 2, // => line width in pixels
- fill: true, // => true to fill the points with a color, false for (transparent) no fill
- fillColor: '#FFFFFF', // => fill color
- fillOpacity: 0.4
- },
- lines: {
- show: false, // => setting to true will show lines, false will hide
- lineWidth: 2, // => line width in pixels
- fill: false, // => true to fill the area from the line to the x axis, false for (transparent) no fill
- fillColor: null, // => fill color
- fillOpacity: 0.4 // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill
- },
- radar: {
- show: false, // => setting to true will show radar chart, false will hide
- lineWidth: 2, // => line width in pixels
- fill: false, // => true to fill the area from the line to the x axis, false for (transparent) no fill
- fillColor: null, // => fill color
- fillOpacity: 0.4 // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill
- },
- bars: {
- show: false, // => setting to true will show bars, false will hide
- lineWidth: 2, // => in pixels
- barWidth: 1, // => in units of the x axis
- fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill
- fillColor: null, // => fill color
- fillOpacity: 0.4, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill
- horizontal: false,
- stacked: false
- },
- candles: {
- show: false, // => setting to true will show candle sticks, false will hide
- lineWidth: 1, // => in pixels
- wickLineWidth: 1, // => in pixels
- candleWidth: 0.6, // => in units of the x axis
- fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill
- upFillColor: '#00A8F0',// => up sticks fill color
- downFillColor: '#CB4B4B',// => down sticks fill color
- fillOpacity: 0.5, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill
- barcharts: false // => draw as barcharts (not standard bars but financial barcharts)
- },
- pie: {
- show: false, // => setting to true will show bars, false will hide
- lineWidth: 1, // => in pixels
- fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill
- fillColor: null, // => fill color
- fillOpacity: 0.6, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill
- 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', // => primary color used for outline and labels
- backgroundColor: null, // => null for transparent, else color
- tickColor: '#DDDDDD', // => color used for the ticks
- labelMargin: 3, // => margin in pixels
- verticalLines: true, // => whether to show gridlines in vertical direction
- horizontalLines: true, // => whether to show gridlines in horizontal direction
- outlineWidth: 2 // => width of the grid outline/border in pixels
- },
- selection: {
- mode: null, // => one of null, 'x', 'y' or 'xy'
- color: '#B6D9FF', // => selection box color
- fps: 20 // => frames-per-second
- },
- mouse: {
- track: false, // => true to track the mouse, no tracking otherwise
- position: 'se', // => position of the value box (default south-east)
- relative: false, // => next to the mouse cursor
- trackFormatter: Flotr.defaultTrackFormatter, // => formats the values in the value box
- margin: 5, // => margin in pixels of the valuebox
- lineColor: '#FF3F19', // => line color of points that are drawn when mouse comes near a value of a series
- trackDecimals: 1, // => decimals for the track values
- sensibility: 2, // => the lower this number, the more precise you have to aim to show a value
- radius: 3 // => radius of the track point
- },
- radarChartMode: false, // => true to render radar grid / and setup scaling for radar chart
- shadowSize: 4, // => size of the 'fake' shadow
- defaultType: 'lines', // => default series type
- HtmlText: true, // => wether to draw the text using HTML or on the canvas
- fontSize: 7.5, // => canvas' text font size
- spreadsheet: {
- show: false, // => show the data grid using two tabs
- tabGraphLabel: 'Graph',
- tabDataLabel: 'Data',
- toolbarDownload: 'Download CSV', // @todo: add language support
- toolbarSelectAll: 'Select all'
- }
- }
-
- options.x2axis = Object.extend(Object.clone(options.xaxis), options.x2axis);
- options.y2axis = Object.extend(Object.clone(options.yaxis), options.y2axis);
- this.options = Flotr.merge((opts || {}), options);
-
- 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}
- };
-
- // Initialize some variables used throughout this function.
- var assignedColors = [],
- colors = [],
- ln = this.series.length,
- neededColors = this.series.length,
- oc = this.options.colors,
- usedColors = [],
- variation = 0,
- c, i, j, s, tooClose;
-
- // Collect user-defined colors from series.
- for(i = neededColors - 1; i > -1; --i){
- c = this.series[i].color;
- if(c != null){
- --neededColors;
- if(Object.isNumber(c)) assignedColors.push(c);
- else usedColors.push(Flotr.parseColor(c));
- }
- }
-
- // Calculate the number of colors that need to be generated.
- for(i = assignedColors.length - 1; i > -1; --i)
- neededColors = Math.max(neededColors, assignedColors[i] + 1);
-
- // Generate needed number of colors.
- for(i = 0; colors.length < neededColors;){
- c = (oc.length == i) ? new Flotr.Color(100, 100, 100) : Flotr.parseColor(oc[i]);
-
- // Make sure each serie gets a different color.
- var sign = variation % 2 == 1 ? -1 : 1;
- var factor = 1 + sign * Math.ceil(variation / 2) * 0.2;
- c.scale(factor, factor, factor);
-
- /**
- * @todo if we're getting too close to something else, we should probably skip this one
- */
- colors.push(c);
-
- if(++i >= oc.length){
- i = 0;
- ++variation;
- }
- }
-
- // Fill the options with the generated colors.
- for(i = 0, j = 0; i < ln; ++i){
- s = this.series[i];
-
- // Assign the color.
- if(s.color == null){
- s.color = colors[j++].toString();
- }else if(Object.isNumber(s.color)){
- s.color = colors[s.color].toString();
- }
-
- if (!s.xaxis) s.xaxis = this.axes.x;
- if (s.xaxis == 1) s.xaxis = this.axes.x;
- else if (s.xaxis == 2) s.xaxis = this.axes.x2;
-
- if (!s.yaxis) s.yaxis = this.axes.y;
- if (s.yaxis == 1) s.yaxis = this.axes.y;
- else if (s.yaxis == 2) s.yaxis = this.axes.y2;
-
- // Apply missing options to the series.
- s.lines = Object.extend(Object.clone(this.options.lines), s.lines);
- s.points = Object.extend(Object.clone(this.options.points), s.points);
- s.bars = Object.extend(Object.clone(this.options.bars), s.bars);
- s.candles = Object.extend(Object.clone(this.options.candles), s.candles);
- s.pie = Object.extend(Object.clone(this.options.pie), s.pie);
- s.radar = Object.extend(Object.clone(this.options.radar), s.radar);
- s.mouse = Object.extend(Object.clone(this.options.mouse), s.mouse);
-
- if(s.shadowSize == null) s.shadowSize = this.options.shadowSize;
- }
- },
- /**
- * Initializes the canvas and it's overlay canvas element. When the browser is IE, this makes use
- * of excanvas. The overlay canvas is inserted for displaying interactions. After the canvas elements
- * are created, the elements are inserted into the container element.
- */
- constructCanvas: function(){
- var el = this.el,
- size,