UX: Add keyboard bidning for incoming/updated topics
Fixed the selector used to gain access to the clickable div
This commit is contained in:
parent
5ca96e741d
commit
8033972536
|
@ -35,6 +35,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
|
||||||
'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular
|
'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 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
|
'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching
|
||||||
|
'.': '.alert.alert-info.clickable', // show incoming/updated topics
|
||||||
'n': '#user-notifications', // open notifications menu
|
'n': '#user-notifications', // open notifications menu
|
||||||
'o,enter': '.topic-list tr.selected a.title', // open selected topic
|
'o,enter': '.topic-list tr.selected a.title', // open selected topic
|
||||||
'shift+r': '#topic-footer-buttons button.create', // reply to topic
|
'shift+r': '#topic-footer-buttons button.create', // reply to topic
|
||||||
|
@ -51,7 +52,6 @@ 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
|
||||||
|
@ -134,11 +134,6 @@ 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});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue