Skip to content

Commit

Permalink
Issue #5: Improve the Utility of the Trip Problem Report Admin Interface
Browse files Browse the repository at this point in the history
Fix trip problem label auto-suggest bug.
  • Loading branch information
bdferris committed Apr 17, 2012
1 parent 76148b5 commit a10c818
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
var data = {};
data.tripProblemReport = <oba:json value="model"/>;
data.vehicleLocationRecords = <oba:json value="vehicleLocationRecords"/>;
data.problemLabels = <oba:json value="labels" />;
jQuery(document).ready(function() { oba_admin_problems_trip_problem_reports(data); } );
</script>
</head>
Expand Down Expand Up @@ -184,12 +185,6 @@

</s:form>

<script type="text/javascript">
jQuery("input#trip-problem-reports_label").autocomplete({
source: <oba:json value="labels" />
});
</script>

</div>

<div id="vehicleLocationRecords">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* limitations under the License.
*/
function oba_admin_problems_trip_problem_reports(data) {

var labelElement = jQuery("input#trip-problem-report_label");
labelElement.autocomplete({
source: data.problemLabels
});

var mapElement = jQuery("#tripProblemReportMap");
var map = OBA.Maps.map(mapElement);
var infoWindow = new google.maps.InfoWindow();
Expand Down

0 comments on commit a10c818

Please sign in to comment.