From: maxious Date: Wed, 16 Feb 2011 12:14:04 +0000 Subject: Wrap time/place and map in collapsing regions X-Git-Url: http://maxious.lambdacomplex.org/git/?p=bus.git&a=commitdiff&h=f5f540cd5b56c26277d3f6b849010887cca84e51 --- Wrap time/place and map in collapsing regions --- --- a/busui/common.inc.php +++ b/busui/common.inc.php @@ -8,8 +8,6 @@ // you have to open the session to be able to modify or remove it session_start(); - - function isDebug() { return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME']; @@ -228,8 +226,11 @@ } $center = $totalLat/sizeof($mapPoints).",".$totalLon/sizeof($mapPoints); } - - return ''; + $output = ""; + $output .= '

Open Map...

'; + $output .= '
'; + $output .= '
'; + return $output; } function distance($lat1, $lng1, $lat2, $lng2) @@ -392,6 +393,36 @@ } return implode(", ",$pointNames); } + +function timePlaceSettings() { + global $service_periods; + echo '
+

Change Time/Place...

+
+
+ + +
+
+ + +
+
+ + + +
+ + +
'; +echo " "; +} ?> - - --- a/busui/index.php +++ b/busui/index.php @@ -30,34 +30,8 @@
  • Routes By Number
  • Nearby Routes
  • -
    -

    Time/Place Settings

    -
    - - -
    -
    - - "/> -
    -
    - - - -
    - - -
    - - + + --- a/busui/js/jquery.ui.datepicker.mobile.js +++ b/busui/js/jquery.ui.datepicker.mobile.js @@ -47,9 +47,12 @@ }; //bind to pagecreate to automatically enhance date inputs - $( ".ui-page" ).live( "pagecreate", function(){ + $( ".ui-page" ).live( "pagecreate", function(){ $( "input[type='date'], input[data-type='date']" ).each(function(){ + if ($(this).hasClass("hasDatepicker") == false) { $(this).after( $( "
    " ).datepicker({ altField: "#" + $(this).attr( "id" ), showOtherMonths: true }) ); - }); - }); + $(this).addClass("hasDatepicker"); + } + }); + }); })( jQuery ); --- a/busui/tripPlanner.php +++ b/busui/tripPlanner.php @@ -6,7 +6,8 @@ $from = (isset($_REQUEST['from']) ? $_REQUEST['from'] : "Brigalow"); $to = (isset($_REQUEST['to']) ? $_REQUEST['to'] : "Barry"); $date = (isset($_REQUEST['date']) ? $_REQUEST['date'] : date("m/d/Y")); - $time = (isset($_REQUEST['time']) ? $_REQUEST['time'] : date("h:ia")); + $time = (isset($_REQUEST['time']) ? $_REQUEST['time'] : date("H:m")); + # todo: convert date from form to h:ia? echo "$errorMessage"; echo '