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:
rolux 2012-04-19 09:34:40 +00:00
parent ab46a85a89
commit fbadfec8f6

View file

@ -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,