update entities dialog

This commit is contained in:
rolux 2014-11-20 15:39:33 +00:00
parent ea6c240e99
commit 64b9cf48f8

View file

@ -124,9 +124,7 @@ pandora.ui.entitiesDialog = function(options) {
orientation: 'vertical'
})
.bindEvent({
resize: function() {
// ...
}
resize: updateList
}),
$entity = Ox.Element(),
@ -220,9 +218,7 @@ pandora.ui.entitiesDialog = function(options) {
orientation: 'vertical'
})
.bindEvent({
resize: function() {
// ...
}
resize: updateForm
}),
$content = Ox.SplitPanel({
@ -373,6 +369,23 @@ pandora.ui.entitiesDialog = function(options) {
});
}
function updateForm() {
var width = $content.options('elements')[2].size - 8;
$labels.forEach(function($label) {
$label.options({width: width});
});
$inputs.forEach(function($input) {
$input.options({width: width});
})
}
function updateList() {
var width = $content.options('elements')[0].size;
$entitiesSelect.options({width: Math.ceil((size - 12) / 2)});
$findInput.options({width: Math.floor((size - 12) / 2)});
$list.size();
}
return that;
};