From b71b35a4185f1a1336f59234fa99464b81824165 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 Jan 2016 13:56:43 +0530 Subject: [PATCH] fix autocomplete scope --- static/js/findElement.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/static/js/findElement.js b/static/js/findElement.js index 0b6d105..dba8cb9 100644 --- a/static/js/findElement.js +++ b/static/js/findElement.js @@ -134,15 +134,20 @@ oml.ui.findElement = function() { : that.value()[1], findKey = Ox.getObjectById(oml.config.findKeys, key); return findKey && findKey.autocomplete ? function(value, callback) { + var findIn = oml.$ui.findInSelect.options('value'), + list = ui._list && findIn == 'list' + ? ui._list + : findIn == 'user' + ? ':' + : void 0; oml.api.autocomplete({ key: key, query: { - conditions: ui._list - && oml.$ui.findInSelect.value() == 'list' + conditions: list ? [{ key: 'list', operator: '==', - value: ui._list + value: list }] : [], operator: '&'