From 686bd8c2383b57666d7c74a418f85e5be668f55d Mon Sep 17 00:00:00 2001 From: j Date: Sat, 13 Jul 2019 17:08:59 +0100 Subject: [PATCH] search in documents --- static/js/collectionIconPanel.js | 2 +- static/js/listDialog.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/collectionIconPanel.js b/static/js/collectionIconPanel.js index 6ee34e8d..35007d84 100644 --- a/static/js/collectionIconPanel.js +++ b/static/js/collectionIconPanel.js @@ -230,7 +230,7 @@ pandora.ui.collectionIconPanel = function(listData) { that.updateQuery = function(key, value) { $list.options({ items: function(data, callback) { - pandora.api.find(Ox.extend(data, { + pandora.api.findDocuments(Ox.extend(data, { query: { conditions: [{key: 'collection', value: listData.id, operator: '=='}].concat( value !== '' diff --git a/static/js/listDialog.js b/static/js/listDialog.js index 8187bbfa..35051d32 100644 --- a/static/js/listDialog.js +++ b/static/js/listDialog.js @@ -69,7 +69,11 @@ pandora.ui.listDialog = function(section) { var $findElement = Ox.FormElementGroup({ elements: [ pandora.$ui.findIconItemSelect = Ox.Select({ - items: pandora.site.findKeys.map(function(findKey) { + items: ( + pandora.user.ui.section == 'items' + ? pandora.site.findKeys + : pandora.site.documentKeys + ).map(function(findKey) { return {id: findKey.id, title: Ox._('Find: {0}', [Ox._(findKey.title)])}; }), overlap: 'right',