From 0e21b1cd4aeab8dad2b60193e541072f58d56ca9 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 19 Dec 2014 16:10:48 +0000 Subject: [PATCH] fix #2602 (handle annotation layers with type 'entity' in advanced find) --- static/js/filterForm.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/filterForm.js b/static/js/filterForm.js index df015747b..c69a5669e 100644 --- a/static/js/filterForm.js +++ b/static/js/filterForm.js @@ -19,10 +19,14 @@ pandora.ui.filterForm = function(options) { that.append( that.$filter = Ox.Filter({ 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.type = key.type == 'layer' - ? Ox.getObjectById(pandora.site.layers, key.id).type + ? (layerType == 'entity' ? 'string' : layerType) : key.type; if (key.format && key.format.type == 'ColorPercent') { key.format.type = 'percent';