api rename: getPlaceNames/getEventNames to getPlaces and getEvents, fixes #2609

This commit is contained in:
j 2014-12-22 10:35:39 +00:00
parent ed8f8517c5
commit 6c6693e922
3 changed files with 7 additions and 7 deletions

View file

@ -214,7 +214,7 @@ def findEvents(request, data):
return render_to_json_response(response)
actions.register(findEvents)
def getEventNames(request, data):
def getEvents(request, data):
'''
Gets event names and matches
takes {}
@ -227,7 +227,7 @@ def getEventNames(request, data):
... // more events
]
}
see: getPlaceNames
see: getPlaces
'''
response = json_response({})
layers = [l['id'] for l in filter(lambda l: l['type'] == 'event',
@ -240,4 +240,4 @@ def getEventNames(request, data):
'matches': i['value__count']
} for i in items]
return render_to_json_response(response)
actions.register(getEventNames)
actions.register(getEvents)

View file

@ -269,7 +269,7 @@ def findPlaces(request, data):
return render_to_json_response(response)
actions.register(findPlaces)
def getPlaceNames(request, data):
def getPlaces(request, data):
'''
Gets place names and matches
takes {}
@ -282,7 +282,7 @@ def getPlaceNames(request, data):
... // more places
]
}
see: getEventNames
see: getEvents
'''
response = json_response({})
layers = [l['id'] for l in filter(lambda l: l['type'] == 'place',
@ -295,4 +295,4 @@ def getPlaceNames(request, data):
'matches': i['value__count']
} for i in items]
return render_to_json_response(response)
actions.register(getPlaceNames)
actions.register(getPlaces)

View file

@ -53,7 +53,7 @@ pandora.ui.placesDialog = function(options) {
height: height - 48,
mode: pandora.site.map == 'auto' ? 'add' : 'define',
names: pandora.hasPlacesLayer ? function(callback) {
pandora.api.getPlaceNames(function(result) {
pandora.api.getPlaces(function(result) {
callback(result.data.items);
});
} : null,