From 09641b11e48d132a704017039b7e50b5a830a388 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 29 May 2011 18:22:54 +0200 Subject: [PATCH] deselect place in list when selecting a result on map --- source/Ox.UI/js/Map/Ox.ListMap.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Map/Ox.ListMap.js b/source/Ox.UI/js/Map/Ox.ListMap.js index 4fefc28b..8f3150c9 100644 --- a/source/Ox.UI/js/Map/Ox.ListMap.js +++ b/source/Ox.UI/js/Map/Ox.ListMap.js @@ -298,6 +298,7 @@ Ox.ListMap = function(options, self) { }, */ changeplace: function(event, data) { + // fixme: is there a changeplace event in Map??? self.$placeForm.values(Ox.map(data, function(val, key) { // fixme: no size key anymore return key == 'size' ? Ox.formatArea(val) : val; @@ -605,8 +606,8 @@ Ox.ListMap = function(options, self) { isResult = place.id[0] == '_'; //isResult && self.options.places.push(place); self.selectedPlace = place.id; - place.id[0] != '_' && self.$list.options({ - selected: place.id ? [place.id] : [] + self.$list.options({ + selected: place.id && !isResult ? [place.id] : [] }); self.$placeTitleFlag.attr({ src: Ox.getImageByGeoname('icon', 16, place.geoname)