use correct api for add/edit/remove place; fix demo
This commit is contained in:
parent
c99e7af1bd
commit
120a28eaa2
2 changed files with 4 additions and 4 deletions
|
@ -48,9 +48,9 @@ Ox.load('Geo', function() {
|
|||
var $listmap = new Ox.ListMap({
|
||||
addPlace: function(data, callback) {
|
||||
var id = Ox.encodeBase32(Ox.uid());
|
||||
Ox.print('addplace', getGeonameSort(data.place.geoname));
|
||||
places.push(Ox.extend(data.place, {
|
||||
geonameSort: getGeonameSort(data.place.geoname),
|
||||
Ox.print('addplace', getGeonameSort(data.geoname));
|
||||
places.push(Ox.extend(data, {
|
||||
geonameSort: getGeonameSort(data.geoname),
|
||||
id: id
|
||||
}));
|
||||
callback({
|
||||
|
|
|
@ -572,7 +572,7 @@ Ox.ListMap = function(options, self) {
|
|||
}
|
||||
//that.triggerEvent('addplace', {place: place});
|
||||
if (self.isAsync) {
|
||||
self.options.addPlace({place: place}, function(result) {
|
||||
self.options.addPlace(place, function(result) {
|
||||
place.id = result.data.id;
|
||||
self.selectedPlace = place.id;
|
||||
self.$list.reloadList().options({selected: [place.id]});
|
||||
|
|
Loading…
Reference in a new issue