fix a bug that would make item keys available as text list columns even though they depend on a capability
This commit is contained in:
parent
ab46a85a89
commit
fbadfec8f6
1 changed files with 19 additions and 16 deletions
|
@ -54,7 +54,9 @@ pandora.ui.list = function() {
|
|||
width: 16
|
||||
}], Ox.map(pandora.site.sortKeys, function(key) {
|
||||
var position = pandora.user.ui.listColumns.indexOf(key.id);
|
||||
return {
|
||||
return !key.capability
|
||||
|| pandora.site.capabilities[key.capability][pandora.user.level]
|
||||
? {
|
||||
align: ['string', 'text'].indexOf(
|
||||
Ox.isArray(key.type) ? key.type[0]: key.type
|
||||
) > -1 ? 'left' : key.type == 'list' ? 'center' : 'right',
|
||||
|
@ -69,7 +71,8 @@ pandora.ui.list = function() {
|
|||
unique: key.id == 'id',
|
||||
visible: position > -1,
|
||||
width: pandora.user.ui.listColumnWidth[key.id] || key.columnWidth
|
||||
};
|
||||
}
|
||||
: null;
|
||||
})),
|
||||
columnsMovable: true,
|
||||
columnsRemovable: true,
|
||||
|
|
Loading…
Reference in a new issue