fix bugs related to resizing the form in the users dialog

This commit is contained in:
rolux 2012-03-23 08:55:22 +00:00
parent ef0c0e337c
commit ab0966c6aa
2 changed files with 24 additions and 6 deletions

View file

@ -34,6 +34,15 @@ pandora.ui.statisticsDialog = function() {
$dialog = Ox.Dialog({ $dialog = Ox.Dialog({
buttons: [ buttons: [
Ox.Button({
id: 'manageUsers',
title: 'Manage Users...'
}).bindEvent({
click: function() {
// ...
}
}),
{},
Ox.Button({ Ox.Button({
id: 'close', id: 'close',
title: 'Close' title: 'Close'

View file

@ -464,6 +464,15 @@ pandora.ui.usersDialog = function() {
that = Ox.Dialog({ that = Ox.Dialog({
buttons: [ buttons: [
Ox.Button({
id: 'statistics',
title: 'Statistics...'
}).bindEvent({
click: function() {
// ...
}
}),
{},
Ox.Button({ Ox.Button({
title: 'Export E-Mail Addresses' title: 'Export E-Mail Addresses'
}) })
@ -534,12 +543,12 @@ pandora.ui.usersDialog = function() {
.css({ .css({
position: 'absolute', position: 'absolute',
top: '4px', top: '4px',
left: '4px', left: '128px',
right: '256px', right: '384px',
bottom: '4px', bottom: '4px',
paddingTop: '2px', paddingTop: '2px',
fontSize: '9px', fontSize: '9px',
textAlign: 'center', textAlign: 'center'
}) })
.appendTo(that.$element.find('.OxButtonsbar')); .appendTo(that.$element.find('.OxButtonsbar'));
@ -907,15 +916,15 @@ pandora.ui.usersDialog = function() {
} }
function setWidth() { function setWidth() {
var $form = $formButton.value() == 'edit' ? $editForm : $mailForm;
formWidth = $content.size(1); formWidth = $content.size(1);
$formLabel.options({width: formWidth - 44}); $formLabel.options({width: formWidth - 44});
( $form && $form.options('items').forEach(function($item) {
$formButton.value() == 'edit' ? $editForm : $mailForm
).options('items').forEach(function($item) {
if ($item.options('id') != 'send') { if ($item.options('id') != 'send') {
$item.options({width: formWidth - 16}); $item.options({width: formWidth - 16});
} }
}); });
$status.css({right: formWidth + 128 + 'px'});
} }
function updateList() { function updateList() {