forked from 0x2620/pandora
update entities dialog
This commit is contained in:
parent
ea6c240e99
commit
64b9cf48f8
1 changed files with 19 additions and 6 deletions
|
@ -124,9 +124,7 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
resize: function() {
|
resize: updateList
|
||||||
// ...
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
$entity = Ox.Element(),
|
$entity = Ox.Element(),
|
||||||
|
@ -220,9 +218,7 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
resize: function() {
|
resize: updateForm
|
||||||
// ...
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
$content = Ox.SplitPanel({
|
$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;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue