UX: Add keyboard bidning for incoming/updated topics

This commit is contained in:
cpradio 2014-08-29 09:44:26 -04:00
parent 723798cc30
commit 5ca96e741d
3 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
'u': 'goBack', 'u': 'goBack',
'`': 'nextSection', '`': 'nextSection',
'~': 'prevSection', '~': 'prevSection',
'.': 'showIncomingUpdatedTopics',
'/': 'showSearch', '/': 'showSearch',
'=': 'showSiteMap', // open site map menu '=': 'showSiteMap', // open site map menu
'p': 'showCurrentUser', // open current user menu 'p': 'showCurrentUser', // open current user menu
@ -133,6 +134,11 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
} }
}, },
showIncomingUpdatedTopics: function() {
$('.alert .alert-info .clickable').click();
return false;
},
toggleProgress: function() { toggleProgress: function() {
Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion', {highlight: true}); Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion', {highlight: true});
}, },

View File

@ -26,6 +26,7 @@
<li>{{{i18n keyboard_shortcuts_help.application.notifications}}}</li> <li>{{{i18n keyboard_shortcuts_help.application.notifications}}}</li>
<li>{{{i18n keyboard_shortcuts_help.application.site_map_menu}}}</li> <li>{{{i18n keyboard_shortcuts_help.application.site_map_menu}}}</li>
<li>{{{i18n keyboard_shortcuts_help.application.user_profile_menu}}}</li> <li>{{{i18n keyboard_shortcuts_help.application.user_profile_menu}}}</li>
<li>{{{i18n keyboard_shortcuts_help.application.show_incoming_updated_topics}}}</li>
<li>{{{i18n keyboard_shortcuts_help.application.search}}}</li> <li>{{{i18n keyboard_shortcuts_help.application.search}}}</li>
<li>{{{i18n keyboard_shortcuts_help.application.help}}}</li> <li>{{{i18n keyboard_shortcuts_help.application.help}}}</li>
</ul> </ul>

View File

@ -2056,6 +2056,7 @@ en:
notifications: '<b>n</b> Open notifications' notifications: '<b>n</b> Open notifications'
site_map_menu: '<b>=</b> Open site map menu' site_map_menu: '<b>=</b> Open site map menu'
user_profile_menu: '<b>p</b> Open user profile menu' user_profile_menu: '<b>p</b> Open user profile menu'
show_incoming_updated_topics: '<b>.</b> Show incoming/updated topics'
search: '<b>/</b> Search' search: '<b>/</b> Search'
help: '<b>?</b> Open keyboard shortcuts help' help: '<b>?</b> Open keyboard shortcuts help'
actions: actions: