forked from 0x2620/pandora
use common map & filter
This commit is contained in:
parent
98af37696f
commit
c0851b5a7f
16 changed files with 90 additions and 79 deletions
|
|
@ -28,13 +28,14 @@ pandora.ui.findElement = function() {
|
|||
pandora.$ui.findSelect = Ox.Select({
|
||||
id: 'select',
|
||||
items: Ox.merge(
|
||||
Ox.map(pandora.site.findKeys, function(key, i) {
|
||||
pandora.site.findKeys.filter(function(key, i) {
|
||||
return !key.capability
|
||||
|| pandora.site.capabilities[key.capability][pandora.user.level]
|
||||
? {
|
||||
|| pandora.site.capabilities[key.capability][pandora.user.level];
|
||||
}).map(function(key) {
|
||||
return {
|
||||
id: key.id,
|
||||
title: 'Find: ' + key.title,
|
||||
} : null;
|
||||
};
|
||||
}),
|
||||
[{}, {
|
||||
id: 'advanced',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue