add itemKey.advanced if set, key does not show in findElement

This commit is contained in:
j 2016-09-22 23:05:48 +02:00
parent 29600fa5f7
commit ee2c59047b

View file

@ -34,8 +34,9 @@ pandora.ui.findElement = function() {
id: 'select', id: 'select',
items: [].concat( items: [].concat(
pandora.site.findKeys.filter(function(key, i) { pandora.site.findKeys.filter(function(key, i) {
return !key.capability return (!key.capability
|| pandora.site.capabilities[key.capability][pandora.user.level]; || pandora.site.capabilities[key.capability][pandora.user.level])
&& !key.advanced;
}).map(function(key) { }).map(function(key) {
return { return {
id: key.id, id: key.id,