use new array input options

This commit is contained in:
rolux 2015-02-14 19:52:30 +00:00
parent 55bcb58f4c
commit 1e2e87ba84

View file

@ -676,8 +676,9 @@ pandora.ui.documentsPanel = function(options) {
].concat(
pandora.site.entities && pandora.site.entities.length
? Ox.ArrayInput({
getInput: function(width) {
$input = Ox.FormElementGroup({
input: {
get: function(width) {
return Ox.FormElementGroup({
elements: [
Ox.Select({
items: pandora.site.entities.map(function(entity) {
@ -713,17 +714,20 @@ pandora.ui.documentsPanel = function(options) {
],
width: width
});
return $input;
},
getEmpty: function() {
return [pandora.site.entities[0].id, ''];
},
isEmpty: function(value) {
return value[1] === '';
},
label: Ox._('Entities'),
setWidth: function(width) {
setWidth: function($input, width) {
$input.options('elements')[1].options({
width: width - labelWidth
});
},
}
}
label: Ox._('Entities'),
value: item.entities.map(function(entity) {
return [entity.type, entity.name];
}),