api rename: getPlaceNames/getEventNames to getPlaces and getEvents, fixes #2609
This commit is contained in:
parent
ed8f8517c5
commit
6c6693e922
3 changed files with 7 additions and 7 deletions
|
@ -214,7 +214,7 @@ def findEvents(request, data):
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(findEvents)
|
actions.register(findEvents)
|
||||||
|
|
||||||
def getEventNames(request, data):
|
def getEvents(request, data):
|
||||||
'''
|
'''
|
||||||
Gets event names and matches
|
Gets event names and matches
|
||||||
takes {}
|
takes {}
|
||||||
|
@ -227,7 +227,7 @@ def getEventNames(request, data):
|
||||||
... // more events
|
... // more events
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
see: getPlaceNames
|
see: getPlaces
|
||||||
'''
|
'''
|
||||||
response = json_response({})
|
response = json_response({})
|
||||||
layers = [l['id'] for l in filter(lambda l: l['type'] == 'event',
|
layers = [l['id'] for l in filter(lambda l: l['type'] == 'event',
|
||||||
|
@ -240,4 +240,4 @@ def getEventNames(request, data):
|
||||||
'matches': i['value__count']
|
'matches': i['value__count']
|
||||||
} for i in items]
|
} for i in items]
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(getEventNames)
|
actions.register(getEvents)
|
||||||
|
|
|
@ -269,7 +269,7 @@ def findPlaces(request, data):
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(findPlaces)
|
actions.register(findPlaces)
|
||||||
|
|
||||||
def getPlaceNames(request, data):
|
def getPlaces(request, data):
|
||||||
'''
|
'''
|
||||||
Gets place names and matches
|
Gets place names and matches
|
||||||
takes {}
|
takes {}
|
||||||
|
@ -282,7 +282,7 @@ def getPlaceNames(request, data):
|
||||||
... // more places
|
... // more places
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
see: getEventNames
|
see: getEvents
|
||||||
'''
|
'''
|
||||||
response = json_response({})
|
response = json_response({})
|
||||||
layers = [l['id'] for l in filter(lambda l: l['type'] == 'place',
|
layers = [l['id'] for l in filter(lambda l: l['type'] == 'place',
|
||||||
|
@ -295,4 +295,4 @@ def getPlaceNames(request, data):
|
||||||
'matches': i['value__count']
|
'matches': i['value__count']
|
||||||
} for i in items]
|
} for i in items]
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(getPlaceNames)
|
actions.register(getPlaces)
|
||||||
|
|
|
@ -53,7 +53,7 @@ pandora.ui.placesDialog = function(options) {
|
||||||
height: height - 48,
|
height: height - 48,
|
||||||
mode: pandora.site.map == 'auto' ? 'add' : 'define',
|
mode: pandora.site.map == 'auto' ? 'add' : 'define',
|
||||||
names: pandora.hasPlacesLayer ? function(callback) {
|
names: pandora.hasPlacesLayer ? function(callback) {
|
||||||
pandora.api.getPlaceNames(function(result) {
|
pandora.api.getPlaces(function(result) {
|
||||||
callback(result.data.items);
|
callback(result.data.items);
|
||||||
});
|
});
|
||||||
} : null,
|
} : null,
|
||||||
|
|
Loading…
Reference in a new issue