This commit is contained in:
rolux 2011-05-28 11:03:49 +02:00
parent 86411a6e22
commit 6bb66b190c

View file

@ -411,7 +411,7 @@ Ox.ListMap = function(options, self) {
place.countryCode = country ? country.code : ''; place.countryCode = country ? country.code : '';
self.selectedPlace = self.selectedPlace.substr(1); // fixme: safe? self.selectedPlace = self.selectedPlace.substr(1); // fixme: safe?
place.id = self.selectedPlace; place.id = self.selectedPlace;
if (Ox.isArray(self.options.place)) { if (Ox.isArray(self.options.places)) {
self.options.places.push(place); self.options.places.push(place);
self.$list.options({ self.$list.options({
items: Ox.clone(self.options.places), items: Ox.clone(self.options.places),
@ -424,7 +424,7 @@ Ox.ListMap = function(options, self) {
that.triggerEvent('addplace', {place: place}); that.triggerEvent('addplace', {place: place});
} else if (title == 'Remove Place') { } else if (title == 'Remove Place') {
var index = Ox.getPositionById(self.options.places, self.selectedPlace); var index = Ox.getPositionById(self.options.places, self.selectedPlace);
if (Ox.isArray(self.options.place)) { if (Ox.isArray(self.options.places)) {
self.options.places.splice(index, 1); self.options.places.splice(index, 1);
self.$list.options({items: Ox.clone(self.options.places)}); self.$list.options({items: Ox.clone(self.options.places)});
setStatus(); setStatus();