diff --git a/pandora/event/views.py b/pandora/event/views.py index c85101698..deb7db8b7 100644 --- a/pandora/event/views.py +++ b/pandora/event/views.py @@ -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) diff --git a/pandora/place/views.py b/pandora/place/views.py index 2c18ca7e5..0e366891c 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -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) diff --git a/static/js/placesDialog.js b/static/js/placesDialog.js index df8ffdae7..b270803f1 100644 --- a/static/js/placesDialog.js +++ b/static/js/placesDialog.js @@ -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,