# HG changeset patch # User Pawel Solyga # Date 1236549597 0 # Node ID 94b64c07f7ce327ddebac2dd0f4960f2cbd2fbc5 # Parent e035f81d367bd2e6def954794145e7ea250abd74 Revert r2376 since it's not needed as discussed in Issue 188. http://code.google.com/p/soc/issues/detail?id=188 Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r e035f81d367b -r 94b64c07f7ce app/soc/content/js/map-090307.js --- a/app/soc/content/js/map-090307.js Sun Mar 08 21:51:17 2009 +0000 +++ b/app/soc/content/js/map-090307.js Sun Mar 08 21:59:57 2009 +0000 @@ -17,7 +17,7 @@ var country_zoom = 4; var state_zoom = 6; var city_zoom = 10; - var postalcode_zoom = 12; + var address_zoom = 13; // Do not add a starting # as this JQuery selector seems // incompatible with GMap API @@ -28,6 +28,10 @@ // Need to save old values to avoid unwanted updating // of lat and lot if marker dragged and blur another time an address field var address = { + street: { + id: "#id_res_street", + old_value: "" + }, city: { id: "#id_res_city", old_value: "" @@ -96,7 +100,7 @@ saveOldAddress(); // Set the new zoom, map center and marker coords var zoom_set = world_zoom; - if ($(address.postalcode.id).val()!="") zoom_set = postalcode_zoom; + if ($(address.street.id).val()!="") zoom_set = address_zoom; else if ($(address.city.id).val()!="") zoom_set = city_zoom; else if ($(address.state.id).val()!="") zoom_set = state_zoom; else if ($(address.country.id).val()!="") zoom_set = country_zoom;