From 0db157e6691494b0e794f8b1f0cad0848a121c41 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 1 Nov 2011 12:03:02 +0000 Subject: [PATCH] use bindKeyboard in menu --- static/js/pandora/menu.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/menu.js b/static/js/pandora/menu.js index 71e5027be..77905afdc 100644 --- a/static/js/pandora/menu.js +++ b/static/js/pandora/menu.js @@ -135,7 +135,7 @@ pandora.ui.mainMenu = function() { { id: 'tour', title: 'Manage Tour...', disabled: !isAdmin }*/ ] }, { id: 'helpMenu', title: 'Help', items: [ - { id: 'help', title: pandora.site.site.name + ' Help', keyboard: 'shift ?' } + { id: 'help', title: pandora.site.site.name + ' Help', keyboard: 'control ?' } ] } ], pandora.site.capabilities.canSeeDebugMenu[pandora.user.level] @@ -150,6 +150,7 @@ pandora.ui.mainMenu = function() { : [] ) }) + .bindKeyboard() .bindEvent({ change: function(data) { var value = data.checked[0] ? data.checked[0].id : null; @@ -269,6 +270,29 @@ pandora.ui.mainMenu = function() { that.setItemTitle('debug', (localStorage.debug ? 'Disable' : 'Enable') + ' Debug Mode'); } }, + key_control_f: function() { + if ($('.OxDialog').length == 0 && $('.OxScreen').length == 0) { + pandora.$ui.findInput.focusInput(true); + } + }, + key_control_slash: function() { + pandora.URL.push('/help'); + }, + key_shift_a: function() { + pandora.UI.set({showAnnotations: !ui.showAnnotations}); + }, + key_shift_b: function() { + pandora.UI.set({showBrowser: !ui.showBrowser}); + }, + key_shift_g: function() { + pandora.UI.set({showGroups: !ui.showGroups}); + }, + key_shift_i: function() { + pandora.UI.set({showInfo: !ui.showInfo}); + }, + key_shift_s: function() { + pandora.UI.set({showSidebar: !ui.showSidebar}); + }, pandora_find: function() { var action = ui._list && pandora.getListData(ui._list).user == pandora.user.username