update entitiesDialog
This commit is contained in:
parent
882aa362cd
commit
ec08c92250
1 changed files with 13 additions and 5 deletions
|
@ -54,20 +54,27 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
],
|
],
|
||||||
items: function(options, callback) {
|
items: function(options, callback) {
|
||||||
pandora.api.findEntities({
|
pandora.api.findEntities({
|
||||||
|
keys: options.keys,
|
||||||
query: {
|
query: {
|
||||||
conditions: [
|
conditions: [
|
||||||
{key: 'type', operator: '==', value: type}
|
{key: 'type', operator: '==', value: type}
|
||||||
].concat(options.query.conditions),
|
].concat(options.query.conditions),
|
||||||
operator: '&'
|
operator: '&'
|
||||||
},
|
},
|
||||||
sort: options.sort,
|
range: options.range,
|
||||||
range: options.range
|
sort: options.sort
|
||||||
}, callback);
|
}, callback);
|
||||||
},
|
},
|
||||||
sort: [{key: 'name', operator: '+'}],
|
sort: [{key: 'name', operator: '+'}],
|
||||||
scrollbarVisible: true,
|
scrollbarVisible: true,
|
||||||
unique: 'id',
|
unique: 'id',
|
||||||
width: 256
|
width: 256 - Ox.SCROLLBAR_SIZE
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
init: function(data) {
|
||||||
|
// FIXME: not localized
|
||||||
|
$listStatus.html(Ox.formatCount(data.items, 'entity', 'entities'))
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
$listStatus = Ox.Element()
|
$listStatus = Ox.Element()
|
||||||
|
@ -92,7 +99,7 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
|
|
||||||
$leftPanel = Ox.SplitPanel({
|
$leftPanel = Ox.SplitPanel({
|
||||||
elements: [
|
elements: [
|
||||||
{element: $listbar, size: 24},
|
{element: $toolbar, size: 24},
|
||||||
{element: $listPanel}
|
{element: $listPanel}
|
||||||
],
|
],
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
|
@ -110,6 +117,7 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
float: 'left',
|
||||||
margin: '4px'
|
margin: '4px'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -120,7 +128,7 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
|
|
||||||
$itemBar = Ox.Bar({size: 24})
|
$itemBar = Ox.Bar({size: 24})
|
||||||
.append($itemMenu),
|
.append($itemMenu),
|
||||||
|
|
Loading…
Reference in a new issue