From 6eff39ec7a130df3675614a8e44770c444903fc5 Mon Sep 17 00:00:00 2001 From: Brian Ferris Date: Sat, 14 Apr 2012 14:41:38 +0200 Subject: [PATCH] Issue #5: Improve the Utility of the Trip Problem Report Admin Interface - Add mouseover effect for the vehicle location records table, such that the currently selected record will have its vehicle location highlighted on the map. - Add a row index column to the vehicle location records table, such that it's easier to identify a specific record. - For the info-window that's shown when you click on a vehicle location record on the map, now show the record row index and a better formatted timestamp, both of which should exactly match the values used in the records table. --- .../problems/trip-problem-reports-edit.jspx | 6 ++-- ...oba-admin-problems-trip-problem-reports.js | 36 +++++++++++++++---- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/onebusaway-webapp/src/main/webapp/WEB-INF/content/admin/problems/trip-problem-reports-edit.jspx b/onebusaway-webapp/src/main/webapp/WEB-INF/content/admin/problems/trip-problem-reports-edit.jspx index 4bc3e80f6..4d4d7f1a3 100644 --- a/onebusaway-webapp/src/main/webapp/WEB-INF/content/admin/problems/trip-problem-reports-edit.jspx +++ b/onebusaway-webapp/src/main/webapp/WEB-INF/content/admin/problems/trip-problem-reports-edit.jspx @@ -33,7 +33,7 @@ var data = {}; data.tripProblemReport = ; data.vehicleLocationRecords = ; - jQuery(document).ready(function() { oba_admin_problems_trip_problem_reports(data) } ); + jQuery(document).ready(function() { oba_admin_problems_trip_problem_reports(data); } ); @@ -197,14 +197,16 @@ jQuery("input#trip-problem-reports_label").autocomplete({ + - + +
Index Time Schedule Deviation Location
diff --git a/onebusaway-webapp/src/main/webapp/js/oba-admin-problems-trip-problem-reports.js b/onebusaway-webapp/src/main/webapp/js/oba-admin-problems-trip-problem-reports.js index 40ab9e67d..6df7f687a 100644 --- a/onebusaway-webapp/src/main/webapp/js/oba-admin-problems-trip-problem-reports.js +++ b/onebusaway-webapp/src/main/webapp/js/oba-admin-problems-trip-problem-reports.js @@ -26,7 +26,7 @@ function oba_admin_problems_trip_problem_reports(data) { if( report.userLat && report.userLon) { var point = new google.maps.LatLng(report.userLat,report.userLon); var url = OBA.Resources.Map['PersonMarker.png']; - var marker = new google.maps.Marker({position: point, map: map, icon: url}); + new google.maps.Marker({position: point, map: map, icon: url}); bounds.extend(point); } @@ -34,7 +34,7 @@ function oba_admin_problems_trip_problem_reports(data) { if( report.vehicleLat && report.vehicleLon) { var point = new google.maps.LatLng(report.vehicleLat,report.vehicleLon); var url = OBA.Resources.Map['MapIcon-Bus-22.png']; - var marker = new google.maps.Marker({position: point, map: map, icon: url}); + new google.maps.Marker({position: point, map: map, icon: url}); bounds.extend(point); } @@ -42,7 +42,7 @@ function oba_admin_problems_trip_problem_reports(data) { if ( report.stop ) { var stop = report.stop; var point = new google.maps.LatLng(stop.lat,stop.lon); - var marker = new google.maps.Marker({position: point, map: map}); + new google.maps.Marker({position: point, map: map}); bounds.extend(point); } @@ -50,9 +50,10 @@ function oba_admin_problems_trip_problem_reports(data) { if( data.vehicleLocationRecords ) { var records = data.vehicleLocationRecords; + var rows = jQuery("#vehicleLocationRecordsTable tr"); for( var i=0; i