diff --git a/static/js/pandora/usersDialog.js b/static/js/pandora/usersDialog.js index ff19f471..1c5ccc6e 100644 --- a/static/js/pandora/usersDialog.js +++ b/static/js/pandora/usersDialog.js @@ -108,6 +108,69 @@ pandora.ui.usersDialog = function() { visible: true, width: 16 }, + { + format: function(value, data) { + return '' + Ox.encodeHTMLEntities(value) + ''; + }, + id: 'username', + operator: '+', + removable: false, + title: 'Username', + visible: true, + width: 120 + }, + { + format: function(value, data) { + return '' + value + ''; + }, + id: 'email', + operator: '+', + title: 'E-Mail Address', + visible: true, + width: 180 + }, + { + align: 'center', + format: function(value, data) { + var userLevel = data.useragent.indexOf('Googlebot') > -1 + ? 'Robot' : Ox.toTitleCase(value); + return Ox.Theme.formatColorLevel( + userLevels.indexOf(userLevel), + userLevels, + [0, 300] + ); + }, + id: 'level', + operator: '-', + title: 'Level', + type: 'label', + visible: true, + width: 60 + }, + { + format: function(value) { + return $('') + .attr({ + src: Ox.UI.getImageURL('symbolMail') + }) + .css({ + width: '10px', + height: '10px', + padding: '3px', + opacity: +value + }); + }, + id: 'newsletter', + title: 'Newsletter', + titleImage: 'mail', + operator: '-', + visible: true, + width: 16 + }, { format: function(value) { return Ox.Element({ @@ -194,87 +257,11 @@ pandora.ui.usersDialog = function() { visible: true, width: 16 }, - - { - format: function(value, data) { - return '' + Ox.encodeHTMLEntities(value) + ''; - }, - id: 'username', - operator: '+', - removable: false, - title: 'Username', - visible: true, - width: 120 - }, - { - format: function(value, data) { - return '' + value + ''; - }, - id: 'email', - operator: '+', - title: 'E-Mail Address', - visible: true, - width: 180 - }, - { - align: 'center', - format: function(value, data) { - var userLevel = data.useragent.indexOf('Googlebot') > -1 - ? 'Robot' : Ox.toTitleCase(value); - return Ox.Theme.formatColorLevel( - userLevels.indexOf(userLevel), - userLevels, - [0, 300] - ); - }, - id: 'level', - operator: '-', - title: 'Level', - type: 'label', - visible: true, - width: 60 - }, - { - id: 'groups', - operator: '+', - title: 'Groups', - visible: true, - width: 90 - }, { + align: 'right', format: function(value) { - return $('') - .attr({ - src: Ox.UI.getImageURL('symbolMail') - }) - .css({ - width: '10px', - height: '10px', - padding: '3px', - opacity: +value - }); + return Ox.formatNumber(value); }, - id: 'newsletter', - title: 'Newsletter', - titleImage: 'mail', - operator: '-', - visible: true, - width: 16 - }, - { - id: 'numberoflists', - align: 'right', - operator: '-', - title: 'Lists', - visible: true, - width: 60 - }, - { - align: 'right', id: 'timesseen', operator: '-', title: 'Times Seen', @@ -304,6 +291,21 @@ pandora.ui.usersDialog = function() { visible: true, width: 150 }, + { + id: 'numberoflists', + align: 'right', + operator: '-', + title: 'Lists', + visible: true, + width: 60 + }, + { + id: 'groups', + operator: '+', + title: 'Groups', + visible: true, + width: 90 + }, { id: 'screensize', align: 'right', @@ -629,18 +631,6 @@ pandora.ui.usersDialog = function() { value: user.level, width: formWidth - 16 }), - Ox.Input({ - id: 'groups', - label: 'Groups', - labelWidth: 80, - value: user.groups ? user.groups.join(', ') : '', - width: formWidth - 16 - }) - .bindEvent({ - submit: function(data) { - - } - }), Ox.Checkbox({ id: 'newsletter', label: 'Newsletter', @@ -657,6 +647,18 @@ pandora.ui.usersDialog = function() { }); } }), + Ox.Input({ + id: 'groups', + label: 'Groups', + labelWidth: 80, + value: user.groups ? user.groups.join(', ') : '', + width: formWidth - 16 + }) + .bindEvent({ + submit: function(data) { + + } + }), Ox.Input({ height: dialogHeight - 184, id: 'notes',