use facets if possible for layer values

This commit is contained in:
j 2011-12-26 21:30:21 +01:00
commit e3b948f08f
4 changed files with 13 additions and 6 deletions

View file

@ -30,7 +30,10 @@ pandora.ui.placesDialog = function() {
pandora.api.findClips({
query: {
conditions: names.map(function(name) {
return {key: 'subtitles', value: name, operator: '='};
//FIXME: this should be more generic
return Ox.getObjectById(pandora.site.layers, 'subtitles')
? {key: 'subtitles', value: name, operator: '='}
: {key: 'locations', value: name, operator: '=='};
}),
operator: names.length == 1 ? '&' : '|'
}