forked from 0x2620/pandora
support batch editing user
This commit is contained in:
parent
a7e660a8da
commit
48aba7bde8
1 changed files with 10 additions and 3 deletions
|
@ -446,9 +446,12 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
pandora.renderRightsLevel(that, $rightsLevel, data, isMixed, isMultiple, canEdit);
|
||||
|
||||
// User and Groups ---------------------------------------------------------
|
||||
if (!isMultiple) {
|
||||
if (!isMultiple || pandora.hasCapability('canEditUsers')) {
|
||||
|
||||
['user', 'groups'].forEach(function(key) {
|
||||
if (key == 'groups' && isMultiple) {
|
||||
return
|
||||
};
|
||||
var $input;
|
||||
(canEdit || data[key] && data[key].length) && $('<div>')
|
||||
.css({marginBottom: '4px'})
|
||||
|
@ -458,10 +461,14 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
.css({margin: '2px 0 0 -1px'}) // fixme: weird
|
||||
.append(
|
||||
$input = Ox.Editable({
|
||||
placeholder: key == 'groups' ? formatLight(Ox._(isMixed[key] ? 'Mixed Groups' : 'No Groups')) : '',
|
||||
placeholder: key == 'groups'
|
||||
? formatLight(Ox._(isMixed[key] ? 'Mixed Groups' : 'No Groups'))
|
||||
: isMixed[key] ? formatLight(Ox._('Mixed Users')) : '',
|
||||
editable: key == 'user' && canEdit,
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
value: key == 'user' ? data[key] : isMixed[key] ? '' : data[key].join(', ')
|
||||
value: isMixed[key]
|
||||
? ''
|
||||
: key == 'user' ? data[key] : data[key].join(', ')
|
||||
})
|
||||
.bindEvent(Ox.extend({
|
||||
submit: function(event) {
|
||||
|
|
Loading…
Reference in a new issue