fix #2602 (handle annotation layers with type 'entity' in advanced find)

This commit is contained in:
rolux 2014-12-19 16:10:48 +00:00
parent f56218e33a
commit 0e21b1cd4a

View file

@ -19,10 +19,14 @@ pandora.ui.filterForm = function(options) {
that.append( that.append(
that.$filter = Ox.Filter({ that.$filter = Ox.Filter({
findKeys: pandora.site.itemKeys.map(function(itemKey) { findKeys: pandora.site.itemKeys.map(function(itemKey) {
var key = Ox.clone(itemKey, true); var key = Ox.clone(itemKey, true),
layerType;
if (key.type == 'layer') {
layerType = Ox.getObjectById(pandora.site.layers, key.id).type;
}
key.title = Ox._(key.title); key.title = Ox._(key.title);
key.type = key.type == 'layer' key.type = key.type == 'layer'
? Ox.getObjectById(pandora.site.layers, key.id).type ? (layerType == 'entity' ? 'string' : layerType)
: key.type; : key.type;
if (key.format && key.format.type == 'ColorPercent') { if (key.format && key.format.type == 'ColorPercent') {
key.format.type = 'percent'; key.format.type = 'percent';