entities dialog: fix form size

This commit is contained in:
rolux 2014-12-15 19:49:01 +00:00
parent a0213cff3e
commit 9ce8eb246d

View file

@ -329,8 +329,10 @@ pandora.ui.entitiesDialog = function(options) {
function renderForm() { function renderForm() {
var id = ui.entitiesSelection[type] var id = ui.entitiesSelection[type]
? ui.entitiesSelection[type][0] ? ui.entitiesSelection[type][0]
: null; : null,
width = $content.options('elements')[2].size
- 16 - Ox.SCROLLBAR_SIZE;
if (!id) { if (!id) {
$form.empty(); $form.empty();
return; return;
@ -347,7 +349,7 @@ pandora.ui.entitiesDialog = function(options) {
var defaultValue = void 0, var defaultValue = void 0,
$label = Ox.Label({ $label = Ox.Label({
title: Ox._(key.title), title: Ox._(key.title),
width: 240 - Ox.SCROLLBAR_SIZE width: width
}) })
.css({ .css({
margin: (index == 0 ? 4 : 16) + 'px 4px 8px 4px' margin: (index == 0 ? 4 : 16) + 'px 4px 8px 4px'
@ -367,14 +369,14 @@ pandora.ui.entitiesDialog = function(options) {
defaultValue = []; defaultValue = [];
} else if (key.type === 'text') { } else if (key.type === 'text') {
$input = Ox.Input({ $input = Ox.Input({
height: 240 - Ox.SCROLLBAR_SIZE, height: width,
type: 'textarea' type: 'textarea'
}); });
} }
$input.options({ $input.options({
disabled: key.id == 'id', disabled: key.id == 'id',
value: result.data[key.id] || defaultValue, value: result.data[key.id] || defaultValue,
width: 240 - Ox.SCROLLBAR_SIZE width: width
}) })
.css({margin: '4px'}) .css({margin: '4px'})
.bindEvent({ .bindEvent({