1
0
Fork 0
forked from 0x2620/oxjs

fix a bug in map where the input element would not change its style when there are no results

This commit is contained in:
rlx 2011-10-01 13:51:03 +00:00
commit 3fa654a815
2 changed files with 15 additions and 13 deletions

View file

@ -647,8 +647,8 @@ Ox.Map = function(options, self) {
callback(new Ox.MapPlace(parseGeodata(results[0])));
}
if (
status == google.maps.GeocoderStatus.OK ||
status == google.maps.GeocoderStatus.ZERO_RESULTS
status == google.maps.GeocoderStatus.OK
&& status != google.maps.GeocoderStatus.ZERO_RESULTS
) {
triggerGeocodeEvent({
address: name,
@ -1262,7 +1262,7 @@ Ox.Map = function(options, self) {
addPlaceToMap(place);
self.map.fitBounds(place.bounds);
} else {
self.$findInput.addClass('OxError');
name && self.$findInput.addClass('OxError');
}
callback(place);
});