also use shift 1 to shift 7 to switch between list views
This commit is contained in:
parent
1d4c544d5f
commit
08496a228e
1 changed files with 20 additions and 9 deletions
|
@ -5,6 +5,7 @@
|
||||||
pandora.ui.mainMenu = function() {
|
pandora.ui.mainMenu = function() {
|
||||||
var isGuest = pandora.user.level == 'guest',
|
var isGuest = pandora.user.level == 'guest',
|
||||||
itemViewKey = 1,
|
itemViewKey = 1,
|
||||||
|
listViewKey = 1,
|
||||||
ui = pandora.user.ui,
|
ui = pandora.user.ui,
|
||||||
findState = pandora.getFindState(ui.find),
|
findState = pandora.getFindState(ui.find),
|
||||||
fromMenu = false,
|
fromMenu = false,
|
||||||
|
@ -67,6 +68,9 @@ pandora.ui.mainMenu = function() {
|
||||||
return Ox.extend({
|
return Ox.extend({
|
||||||
checked: ui.listView == view.id
|
checked: ui.listView == view.id
|
||||||
}, view, {
|
}, view, {
|
||||||
|
keyboard: listViewKey <= 10
|
||||||
|
? 'shift ' + (listViewKey++%10)
|
||||||
|
: void 0,
|
||||||
title: Ox._(view.title)
|
title: Ox._(view.title)
|
||||||
});
|
});
|
||||||
}) },
|
}) },
|
||||||
|
@ -868,15 +872,22 @@ pandora.ui.mainMenu = function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
pandora.site.itemViews.filter(function(view) {
|
Ox.range(10).forEach(function(i) {
|
||||||
return view.id != 'data' && view.id != 'media' ||
|
Ox.Event.bind('key_shift_' + (i + 1) % 10, function() {
|
||||||
pandora.site.capabilities.canSeeExtraItemViews[pandora.user.level];
|
var view;
|
||||||
}).forEach(function(view, i) {
|
if (ui.item) {
|
||||||
if (i < 10) {
|
view = pandora.site.itemViews[i];
|
||||||
Ox.Event.bind('key_shift_' + (i + 1) % 10, function() {
|
if (view && (view.id != 'data' && view.id != 'media' ||
|
||||||
pandora.UI.set({itemView: view.id});
|
pandora.site.capabilities.canSeeExtraItemViews[pandora.user.level])) {
|
||||||
});
|
pandora.UI.set({itemView: view.id});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
view = pandora.site.listViews[i];
|
||||||
|
if (view) {
|
||||||
|
pandora.UI.set({listView: view.id});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
pandora.clipboard.bindEvent(function(data, event) {
|
pandora.clipboard.bindEvent(function(data, event) {
|
||||||
|
|
Loading…
Reference in a new issue