update view menu

This commit is contained in:
rolux 2014-02-14 13:06:57 +05:30
parent e5a738a886
commit 42febc6c04

View file

@ -94,6 +94,21 @@ pandora.ui.mainMenu = function() {
{}, {},
{ id: 'resetcolumns', title: Ox._('Reset Layout'), disabled: true } { id: 'resetcolumns', title: Ox._('Reset Layout'), disabled: true }
] }, ] },
{ id: 'filters', title: Ox._('Filters'), disabled: ui.section != 'items', items: [
{ id: 'clearfilters', title: Ox._('Clear Filters'), disabled: Ox.sum(ui._filterState.map(function(filterState) {
return filterState.selected.length;
})) == 0, keyboard: 'shift alt control a' },
{},
{ group: 'filters', min: 5, max: 5, items: pandora.site.filters.map(function(filter) {
return Ox.extend({
checked: Ox.getIndexById(ui.filters, filter.id) > -1
}, filter, {
title: Ox._(filter.title)
});
}) },
{},
{ id: 'resetfilters', title: Ox._('Reset Filters') }
] },
{}, {},
{ id: 'item', title: [ { id: 'item', title: [
Ox._('Open {0}', [Ox._(pandora.site.itemName.singular)]), Ox._('Open {0}', [Ox._(pandora.site.itemName.singular)]),
@ -113,22 +128,6 @@ pandora.ui.mainMenu = function() {
}) } }) }
] }, ] },
{}, {},
{ id: 'filters', title: Ox._('Filters'), disabled: ui.section != 'items', items: [
{ id: 'clearfilters', title: Ox._('Clear Filters'), disabled: Ox.sum(ui._filterState.map(function(filterState) {
return filterState.selected.length;
})) == 0, keyboard: 'shift alt control a' },
{},
{ group: 'filters', min: 5, max: 5, items: pandora.site.filters.map(function(filter) {
return Ox.extend({
checked: Ox.getIndexById(ui.filters, filter.id) > -1
}, filter, {
title: Ox._(filter.title)
});
}) },
{},
{ id: 'resetfilters', title: Ox._('Reset Filters') }
] },
{},
{ {
id: 'showsidebar', id: 'showsidebar',
title: Ox._((ui.showSidebar ? 'Hide' : 'Show') + ' Sidebar'), title: Ox._((ui.showSidebar ? 'Hide' : 'Show') + ' Sidebar'),
@ -195,7 +194,9 @@ pandora.ui.mainMenu = function() {
{ group: 'setlocale', min: 1, max: 1, items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) { { group: 'setlocale', min: 1, max: 1, items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) {
return {id: locale, title: Ox.LOCALE_NAMES[locale], checked: ui.locale == locale} return {id: locale, title: Ox.LOCALE_NAMES[locale], checked: ui.locale == locale}
}) } }) }
] } ] },
{},
{ id: 'embed', title: Ox._('Embed...'), disabled: true }
]}, ]},
getSortMenu(), getSortMenu(),
getFindMenu(), getFindMenu(),