diff --git a/source/Ox.UI/js/Map/MapEditor.js b/source/Ox.UI/js/Map/MapEditor.js index 8e9303ec..c467596a 100644 --- a/source/Ox.UI/js/Map/MapEditor.js +++ b/source/Ox.UI/js/Map/MapEditor.js @@ -360,7 +360,9 @@ Ox.MapEditor = function(options, self) { that.triggerEvent('loadlist'); }, open: openItem, - select: selectItem + select: function(data) { + selectItem(data); + } }); // if loaded with selection, set map and form @@ -419,7 +421,7 @@ Ox.MapEditor = function(options, self) { self.$map.resizeMap(); // fixme: don't need event }, */ - selectplace: selectPlace + select: selectPlace }); self.$placeTitlebar = Ox.Bar({ @@ -994,12 +996,12 @@ Ox.MapEditor = function(options, self) { function selectItem(data, place) { // Select item in list - Ox.Log('Map', 'selectItem', data, place); var isUndefined, selectedPlace; self.options.selected = data.ids.length ? data.ids[0] : ''; place = place || ( self.options.selected - ? self.$list.value(self.options.selected) : {} + ? self.$list.value(self.options.selected) + : {} ); isUndefined = !!self.options.selected && !place.type; selectedPlace = self.options.selected && !isUndefined @@ -1035,7 +1037,6 @@ Ox.MapEditor = function(options, self) { function selectPlace(place) { // Select place on map - Ox.Log('Map', 'selectPlace', place) var isResult = !!place.id && place.id[0] == '_', isUndefined = !!self.options.selected && !self.$list.value(self.options.selected, 'type');