forked from 0x2620/pandora
usersDialog: change the way the selected users are determined
This commit is contained in:
parent
e290d0c621
commit
265ba82cfa
1 changed files with 6 additions and 5 deletions
|
@ -834,16 +834,17 @@ pandora.ui.usersDialog = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectUsers(data) {
|
function selectUsers(data) {
|
||||||
var users = $list.options('selected').map(function(id) {
|
var users = data.ids.map(function(id) {
|
||||||
return $list.value(id);
|
return $list.value(id);
|
||||||
});
|
});
|
||||||
setLabel();
|
setLabel();
|
||||||
if ($formButton.value() == 'edit') {
|
if ($formButton.value() == 'edit') {
|
||||||
$form.empty();
|
$form.empty();
|
||||||
if (data.ids.length == 1) {
|
if (
|
||||||
if (['guest', 'robot'].indexOf(users[0].level) == -1) {
|
data.ids.length == 1
|
||||||
$form.append($editForm = renderEditForm());
|
&& ['guest', 'robot'].indexOf(users[0].level) == -1
|
||||||
}
|
) {
|
||||||
|
$form.append($editForm = renderEditForm());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTo();
|
setTo();
|
||||||
|
|
Loading…
Reference in a new issue