forked from 0x2620/pandora
search in documents
This commit is contained in:
parent
5129b75650
commit
686bd8c238
2 changed files with 6 additions and 2 deletions
|
@ -230,7 +230,7 @@ pandora.ui.collectionIconPanel = function(listData) {
|
||||||
that.updateQuery = function(key, value) {
|
that.updateQuery = function(key, value) {
|
||||||
$list.options({
|
$list.options({
|
||||||
items: function(data, callback) {
|
items: function(data, callback) {
|
||||||
pandora.api.find(Ox.extend(data, {
|
pandora.api.findDocuments(Ox.extend(data, {
|
||||||
query: {
|
query: {
|
||||||
conditions: [{key: 'collection', value: listData.id, operator: '=='}].concat(
|
conditions: [{key: 'collection', value: listData.id, operator: '=='}].concat(
|
||||||
value !== ''
|
value !== ''
|
||||||
|
|
|
@ -69,7 +69,11 @@ pandora.ui.listDialog = function(section) {
|
||||||
var $findElement = Ox.FormElementGroup({
|
var $findElement = Ox.FormElementGroup({
|
||||||
elements: [
|
elements: [
|
||||||
pandora.$ui.findIconItemSelect = Ox.Select({
|
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)])};
|
return {id: findKey.id, title: Ox._('Find: {0}', [Ox._(findKey.title)])};
|
||||||
}),
|
}),
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
|
|
Loading…
Reference in a new issue