usersDialog: change the way the selected users are determined

This commit is contained in:
rolux 2012-06-30 14:58:21 +00:00
parent e290d0c621
commit 265ba82cfa

View file

@ -834,17 +834,18 @@ 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) {
if (
data.ids.length == 1
&& ['guest', 'robot'].indexOf(users[0].level) == -1
) {
$form.append($editForm = renderEditForm());
}
}
} else {
setTo();
setSend();