From ab0966c6aa11e9e46cdd066f46c99793ad841906 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 23 Mar 2012 08:55:22 +0000 Subject: [PATCH] fix bugs related to resizing the form in the users dialog --- static/js/pandora/statisticsDialog.js | 9 +++++++++ static/js/pandora/usersDialog.js | 21 +++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/static/js/pandora/statisticsDialog.js b/static/js/pandora/statisticsDialog.js index 8fbb6d054..f14c556d3 100644 --- a/static/js/pandora/statisticsDialog.js +++ b/static/js/pandora/statisticsDialog.js @@ -34,6 +34,15 @@ pandora.ui.statisticsDialog = function() { $dialog = Ox.Dialog({ buttons: [ + Ox.Button({ + id: 'manageUsers', + title: 'Manage Users...' + }).bindEvent({ + click: function() { + // ... + } + }), + {}, Ox.Button({ id: 'close', title: 'Close' diff --git a/static/js/pandora/usersDialog.js b/static/js/pandora/usersDialog.js index 6d1f79db9..a966da49c 100644 --- a/static/js/pandora/usersDialog.js +++ b/static/js/pandora/usersDialog.js @@ -464,6 +464,15 @@ pandora.ui.usersDialog = function() { that = Ox.Dialog({ buttons: [ + Ox.Button({ + id: 'statistics', + title: 'Statistics...' + }).bindEvent({ + click: function() { + // ... + } + }), + {}, Ox.Button({ title: 'Export E-Mail Addresses' }) @@ -534,12 +543,12 @@ pandora.ui.usersDialog = function() { .css({ position: 'absolute', top: '4px', - left: '4px', - right: '256px', + left: '128px', + right: '384px', bottom: '4px', paddingTop: '2px', fontSize: '9px', - textAlign: 'center', + textAlign: 'center' }) .appendTo(that.$element.find('.OxButtonsbar')); @@ -907,15 +916,15 @@ pandora.ui.usersDialog = function() { } function setWidth() { + var $form = $formButton.value() == 'edit' ? $editForm : $mailForm; formWidth = $content.size(1); $formLabel.options({width: formWidth - 44}); - ( - $formButton.value() == 'edit' ? $editForm : $mailForm - ).options('items').forEach(function($item) { + $form && $form.options('items').forEach(function($item) { if ($item.options('id') != 'send') { $item.options({width: formWidth - 16}); } }); + $status.css({right: formWidth + 128 + 'px'}); } function updateList() {