From cde64580b14ea2e69f782004cede231d2530906c Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 09:35:38 -0400 Subject: [PATCH] Change the Dismiss keybindings to use 'x' instead of 'd' - moved it to a function binding --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index a4321fe55d2..79e5d71b64a 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -35,7 +35,6 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching - '.': '.alert .alert-info .clickable', // show incoming topics 'n': '#user-notifications', // open notifications menu '=': '#site-map', // open site map menu 'p': '#current-user', // open current user menu @@ -55,6 +54,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ '`': 'nextSection', '~': 'prevSection', '/': 'showSearch', + '.': 'showIncomingUpdatedTopics', // show incoming topics 'ctrl+f': 'showBuiltinSearch', 'command+f': 'showBuiltinSearch', '?': 'showHelpModal', // open keyboard shortcut help @@ -134,6 +134,11 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ } }, + showIncomingUpdatedTopics: function() { + $('.alert .alert-info .clickable').click(); + return false; + }, + toggleProgress: function() { Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion', {highlight: true}); },