Change the Dismiss keybindings to use 'x' instead of 'd' - moved it to a function binding

This commit is contained in:
cpradio 2014-08-29 09:35:38 -04:00
parent 3f085c3fd3
commit cde64580b1
1 changed files with 6 additions and 1 deletions

View File

@ -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});
},