From 83069889db5230b294cbef2c04f4a9dcffb660cb Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 18 Dec 2011 10:30:32 +0000 Subject: [PATCH] in usersDialog, remove hardcoded user levels --- static/js/pandora/usersDialog.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/usersDialog.js b/static/js/pandora/usersDialog.js index 1a7c33e34..3f128d196 100644 --- a/static/js/pandora/usersDialog.js +++ b/static/js/pandora/usersDialog.js @@ -8,7 +8,6 @@ pandora.ui.usersDialog = function() { dialogWidth = Math.round(window.innerWidth * 0.9), formWidth = 256, numberOfUsers = 0, - userLevels = ['member', 'friend', 'staff', 'admin'], $guestsCheckbox = Ox.Checkbox({ checked: true, @@ -495,12 +494,12 @@ pandora.ui.usersDialog = function() { }), Ox.Select({ id: 'level', - items: userLevels.map(function(level) { - return { + items: Ox.map(pandora.site.userLevels, function(level, i) { + return i ? { checked: level == user.level, id: level, title: Ox.toTitleCase(level) - }; + } : null; }), label: 'Level', labelWidth: 80,