Merge pull request #3506 from cpradio/fix-reply-to-topic-shortcut

FIX: Reply to Topic shortcut no longer needs the Reply Topic Button to be available
This commit is contained in:
Régis Hanol 2015-05-28 12:04:28 +02:00
commit 5145fabfbf

View File

@ -27,7 +27,6 @@ var PATH_BINDINGS = {
'.': '.alert.alert-info.clickable', // show incoming/updated topics
'n': '#user-notifications', // open notifications menu
'o,enter': '.topic-list tr.selected a.title', // open selected topic
'shift+r': '#topic-footer-buttons button.create', // reply to topic
'shift+s': '#topic-footer-buttons button.share', // share topic
's': '.topic-post.selected a.post-date' // share post
},
@ -51,7 +50,8 @@ var PATH_BINDINGS = {
'?': 'showHelpModal', // open keyboard shortcut help
'q': 'quoteReply',
'b': 'toggleBookmark',
'f': 'toggleBookmarkTopic'
'f': 'toggleBookmarkTopic',
'shift+r': 'replyToTopic'
};
@ -103,6 +103,10 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
}
},
replyToTopic: function() {
this.container.lookup('controller:topic').send('replyToPost');
},
selectDown: function() {
this._moveSelection(1);
},