}
});
+ input.on("keydown", function() {
+ input.removeClass("error");
+ });
+
input.on("change", function (e) {
awaitingGeocode = true;
endpoint.awaitingGeocode = false;
endpoint.hasGeocode = true;
if (json.length === 0) {
- alert(I18n.t('javascripts.directions.errors.no_place'));
+ input.addClass("error");
+ alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
return;
}
border-radius: 0 2px 2px 0;
}
+ input.error {
+ background-color: rgba($red, 0.4);
+ }
+
select {
/* this next line is to polyfill the vertical alignment of text within a select element,
* which is different between firefox and chrome. */
distance: "Distance"
errors:
no_route: "Couldn't find a route between those two places."
- no_place: "Sorry - couldn't find that place."
+ no_place: "Sorry - couldn't locate '%{place}'."
instructions:
continue_without_exit: Continue on %{name}
slight_right_without_exit: Slight right onto %{name}
onramp_right_with_directions: Turn right onto the ramp towards %{directions}
onramp_right_with_name_directions: Turn right on the ramp onto %{name}, towards %{directions}
onramp_right_without_directions: Turn right onto the ramp
+ onramp_right: Turn right onto the ramp
endofroad_right_without_exit: At the end of the road turn right onto %{name}
merge_right_without_exit: Merge right onto %{name}
fork_right_without_exit: At the fork turn right onto %{name}
onramp_left_with_directions: Turn left onto the ramp towards %{directions}
onramp_left_with_name_directions: Turn left on the ramp onto %{name}, towards %{directions}
onramp_left_without_directions: Turn left onto the ramp
+ onramp_left: Turn left onto the ramp
endofroad_left_without_exit: At the end of the road turn left onto %{name}
merge_left_without_exit: Merge left onto %{name}
fork_left_without_exit: At the fork turn left onto %{name}