From a72633a3504b3efdea0e856f97e697f32118dd0b Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 11 Oct 2011 16:13:21 +0000 Subject: [PATCH] remove non-standard ui elements from manage data dialogs --- static/js/pandora/ui/namesDialog.js | 29 ++++++++++++++++---------- static/js/pandora/ui/titlesDialog.js | 29 ++++++++++++++++---------- static/js/pandora/ui/usersDialog.js | 31 ++++++++++++++++++---------- 3 files changed, 56 insertions(+), 33 deletions(-) diff --git a/static/js/pandora/ui/namesDialog.js b/static/js/pandora/ui/namesDialog.js index a9070825..7708025b 100644 --- a/static/js/pandora/ui/namesDialog.js +++ b/static/js/pandora/ui/namesDialog.js @@ -5,11 +5,6 @@ pandora.ui.namesDialog = function() { width = 576 + Ox.UI.SCROLLBAR_SIZE, numberOfNames = 0, - $status = Ox.Label({ - title: 'Loading...' - }) - .css({float: 'left', margin: '4px'}), - $findSelect = Ox.Select({ items: [ {id: 'all', title: 'Find: All'} @@ -85,7 +80,6 @@ pandora.ui.namesDialog = function() { width: 64 }, ], - columnsRemovable: true, columnsVisible: true, items: pandora.api.findNames, max: 1, @@ -95,10 +89,10 @@ pandora.ui.namesDialog = function() { .bindEvent({ init: function(data) { numberOfNames = data.items; - $status.options({ - title: Ox.formatNumber(numberOfNames) - + ' name' + (numberOfNames == 1 ? '' : 's') - }); + $status.html( + Ox.formatNumber(numberOfNames) + + ' name' + (numberOfNames == 1 ? '' : 's') + ); }, submit: function(data) { pandora.api.editName({ @@ -143,7 +137,20 @@ pandora.ui.namesDialog = function() { padding: 0, title: 'Manage Names', width: width - }); + }), + + $status = $('
') + .css({ + position: 'absolute', + top: '4px', + left: '64px', + right: '64px', + bottom: '4px', + paddingTop: '2px', + fontSize: '9px', + textAlign: 'center', + }) + .appendTo(that.$element.find('.OxButtonsbar')); function updateList(key, value) { var query = { diff --git a/static/js/pandora/ui/titlesDialog.js b/static/js/pandora/ui/titlesDialog.js index 1fac295e..975fa45b 100644 --- a/static/js/pandora/ui/titlesDialog.js +++ b/static/js/pandora/ui/titlesDialog.js @@ -5,11 +5,6 @@ pandora.ui.titlesDialog = function() { width = 512 + Ox.UI.SCROLLBAR_SIZE, numberOfTitles = 0, - $status = Ox.Label({ - title: 'Loading...' - }) - .css({float: 'left', margin: '4px'}), - $findSelect = Ox.Select({ items: [ {id: 'all', title: 'Find: All'} @@ -75,7 +70,6 @@ pandora.ui.titlesDialog = function() { width: 256 }, ], - columnsRemovable: true, columnsVisible: true, items: pandora.api.findTitles, keys: [], @@ -86,10 +80,10 @@ pandora.ui.titlesDialog = function() { .bindEvent({ init: function(data) { numberOfTitles = data.items; - $status.options({ - title: Ox.formatNumber(numberOfTitles) - + ' title' + (numberOfTitles == 1 ? '' : 's') - }); + $status.html( + Ox.formatNumber(numberOfTitles) + + ' title' + (numberOfTitles == 1 ? '' : 's') + ); }, submit: function(data) { pandora.api.editTitle({ @@ -134,7 +128,20 @@ pandora.ui.titlesDialog = function() { padding: 0, title: 'Manage Titles', width: width - }); + }), + + $status = $('
') + .css({ + position: 'absolute', + top: '4px', + left: '64px', + right: '64px', + bottom: '4px', + paddingTop: '2px', + fontSize: '9px', + textAlign: 'center', + }) + .appendTo(that.$element.find('.OxButtonsbar')); function updateList(key, value) { var query = { diff --git a/static/js/pandora/ui/usersDialog.js b/static/js/pandora/ui/usersDialog.js index 75d07a23..959d7199 100644 --- a/static/js/pandora/ui/usersDialog.js +++ b/static/js/pandora/ui/usersDialog.js @@ -13,11 +13,6 @@ pandora.ui.usersDialog = function() { numberOfUsers = 0, userLevels = ['member', 'friend', 'staff', 'admin'], - $status = Ox.Label({ - title: 'Loading...' - }) - .css({float: 'left', margin: '4px'}), - $findSelect = Ox.Select({ items: [ {id: 'all', title: 'Find: All', checked: true}, @@ -226,11 +221,11 @@ pandora.ui.usersDialog = function() { .bindEvent({ init: function(data) { numberOfUsers = data.items; - $status.options({ - title: Ox.formatNumber(numberOfUsers) - + ' user' + (numberOfUsers == 1 ? '' : 's') - + ' (' + Ox.formatNumber(numberOfUsers) + ' registered, 0 guests)' - }); + $status.html( + Ox.formatNumber(numberOfUsers) + + ' user' + (numberOfUsers == 1 ? '' : 's') + + ' (' + Ox.formatNumber(numberOfUsers) + ' registered, 0 guests)' + ); }, select: function(data) { var values; @@ -351,7 +346,21 @@ pandora.ui.usersDialog = function() { padding: 0, title: 'Manage Users', width: width - }); + }), + + $status = $('
') + .css({ + position: 'absolute', + top: '4px', + left: '4px', + right: '256px', + bottom: '4px', + paddingTop: '2px', + fontSize: '9px', + textAlign: 'center', + }) + .appendTo(that.$element.find('.OxButtonsbar')); + function renderUserForm(userData) { var $checkbox;