From 265ba82cfaefae8a7d8048cd645922aa528dcd43 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 30 Jun 2012 14:58:21 +0000 Subject: [PATCH] usersDialog: change the way the selected users are determined --- static/js/pandora/usersDialog.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/static/js/pandora/usersDialog.js b/static/js/pandora/usersDialog.js index 9dc53d31e..4d8f9905f 100644 --- a/static/js/pandora/usersDialog.js +++ b/static/js/pandora/usersDialog.js @@ -834,16 +834,17 @@ pandora.ui.usersDialog = function() { } function selectUsers(data) { - var users = $list.options('selected').map(function(id) { + var users = data.ids.map(function(id) { return $list.value(id); }); setLabel(); if ($formButton.value() == 'edit') { $form.empty(); - if (data.ids.length == 1) { - if (['guest', 'robot'].indexOf(users[0].level) == -1) { - $form.append($editForm = renderEditForm()); - } + if ( + data.ids.length == 1 + && ['guest', 'robot'].indexOf(users[0].level) == -1 + ) { + $form.append($editForm = renderEditForm()); } } else { setTo();