forked from 0x2620/pandora
update mainMenu, sortKeys are now pre-filtered
This commit is contained in:
parent
be702c5d43
commit
3f891469bc
1 changed files with 1 additions and 6 deletions
|
@ -629,12 +629,7 @@ pandora.ui.mainMenu = function() {
|
||||||
{ id: 'sortitems', title: 'Sort ' + (isClipView || ui.item ? 'Clips' : pandora.site.itemName.plural) + ' by', items: [
|
{ id: 'sortitems', title: 'Sort ' + (isClipView || ui.item ? 'Clips' : pandora.site.itemName.plural) + ' by', items: [
|
||||||
{ group: 'listsort', min: 1, max: 1, items: [].concat(
|
{ group: 'listsort', min: 1, max: 1, items: [].concat(
|
||||||
items,
|
items,
|
||||||
pandora.site.sortKeys.filter(function(key) {
|
pandora.site.sortKeys.map(function(key) {
|
||||||
return Ox.getIndexById(items, key.id) == -1 && (
|
|
||||||
!key.capability
|
|
||||||
|| pandora.site.capabilities[key.capability][pandora.user.level]
|
|
||||||
);
|
|
||||||
}).map(function(key) {
|
|
||||||
return Ox.extend({
|
return Ox.extend({
|
||||||
checked: ui.listSort[0].key == key.id
|
checked: ui.listSort[0].key == key.id
|
||||||
}, key);
|
}, key);
|
||||||
|
|
Loading…
Reference in a new issue