From 70bcc962a9cbf9f98c3c46a43f38d995e9ebcbbe Mon Sep 17 00:00:00 2001 From: j Date: Sun, 1 Dec 2019 17:39:33 +0100 Subject: [PATCH] fix find on home --- static/js/home.leftovers.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/static/js/home.leftovers.js b/static/js/home.leftovers.js index 426c513..4ce58a1 100644 --- a/static/js/home.leftovers.js +++ b/static/js/home.leftovers.js @@ -82,14 +82,10 @@ pandora.ui.home = function() { var folder = pandora.getListData().folder, value = $findInput.value(); folder && pandora.$ui.folderList[folder].options({selected: []}); - if (pandora.user.ui.section == 'documents') { - pandora.$ui.findSelect.value('*'); - pandora.$ui.findInput.value(value); - } that.fadeOutScreen(); pandora.UI.set({ page: '', - findDocuments: { + find: { conditions: value === '' ? [] : [{key: '*', value: value, operator: '='}], @@ -97,6 +93,8 @@ pandora.ui.home = function() { }, section: 'documents' }); + pandora.$ui.findSelect && pandora.$ui.findSelect.value('*'); + pandora.$ui.findInput && pandora.$ui.findInput.value(value); } }) .appendTo(that),