From 82efe859639e5fe832e4a938b73272faa5ca4325 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 7 Nov 2009 16:21:13 -0500 Subject: [PATCH] Simplify, can't use the onShow callback in this way anymore, remove commented out code. --- ansel/js/googlemap_edit.js | 3 ++- ansel/lib/Ajax/Imple/LocationAutoCompleter.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansel/js/googlemap_edit.js b/ansel/js/googlemap_edit.js index 757e4a8b8..7bad48e8f 100644 --- a/ansel/js/googlemap_edit.js +++ b/ansel/js/googlemap_edit.js @@ -82,7 +82,7 @@ Ansel_MapEdit.prototype = { lng: this._map.points[0].getLatLng().lng(), type: 'geotag' }; - //url = this._options.url; + new Ajax.Request(o.xurl, { method: 'post', parameters: params, @@ -111,6 +111,7 @@ Ansel_MapEdit.prototype = { this._map.getLocations(this._map.points[0]); this._map.mainMap.setCenter(gll, this._map.defaultZoom); $(o.statusId).update(''); + this.ll = null; } else { this._map.geocoder.getLocations($(o.locationInput).value, function(address) { if (address.Status.code == '200') { diff --git a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php index fea823d3e..e7919781d 100644 --- a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php +++ b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php @@ -20,8 +20,7 @@ class Ansel_Ajax_Imple_LocationAutoCompleter extends Horde_Ajax_Imple_AutoComple $ret = array( 'params' => $js_params, 'raw_params' => array( - 'onSelect' => 'function (v) { ' . $this->_params['map'] . '.ll = Ansel.ajax.locationAutoCompleter.geocache[v];return v;}', - 'onShow' => 'function (e) { if (!e.size()) ' . $this->_params['map'] . '.ll = null; }' + 'onSelect' => 'function (v) { ' . $this->_params['map'] . '.ll = Ansel.ajax.locationAutoCompleter.geocache[v]; return v; }' ), 'var' => "Ansel.ajax['locationAutoCompleter']" ); -- 2.11.0