mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:07:53 +08:00
FIX: Added keyboard bindings for dismiss buttons
This commit is contained in:
parent
723798cc30
commit
ed8d828ff1
|
@ -35,6 +35,9 @@ 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
|
||||
'd n': '#dismiss-new', // dismiss new
|
||||
'd t': '#dismiss-topics', // dismiss topics
|
||||
'd p': '#dismiss-posts', // dismiss posts
|
||||
'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
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{{#if showDismissAtTop}}
|
||||
<div class="row">
|
||||
{{#if showDismissRead}}
|
||||
<button title="{{i18n topics.bulk.dismiss_topics_tooltip}}" class='btn dismiss-read' {{action dismissRead "topics"}}>{{i18n topics.bulk.dismiss_topics}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_posts_tooltip}}" class='btn dismiss-read' {{action dismissRead "posts"}}>{{i18n topics.bulk.dismiss_posts}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_topics_tooltip}}" id='dismiss-topics' class='btn dismiss-read' {{action dismissRead "topics"}}>{{i18n topics.bulk.dismiss_topics}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_posts_tooltip}}" id='dismiss-posts' class='btn dismiss-read' {{action dismissRead "posts"}}>{{i18n topics.bulk.dismiss_posts}}</button>
|
||||
{{/if}}
|
||||
{{#if showResetNew}}
|
||||
<button class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
||||
<button id='dismiss-new' class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -83,11 +83,11 @@
|
|||
{{/if}}
|
||||
{{#if allLoaded}}
|
||||
{{#if showDismissRead}}
|
||||
<button title="{{i18n topics.bulk.dismiss_topics_tooltip}}" class='btn dismiss-read' {{action dismissRead "topics"}}>{{i18n topics.bulk.dismiss_topics}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_posts_tooltip}}" class='btn dismiss-read' {{action dismissRead "posts"}}>{{i18n topics.bulk.dismiss_posts}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_topics_tooltip}}" id='dismiss-topics' class='btn dismiss-read' {{action dismissRead "topics"}}>{{i18n topics.bulk.dismiss_topics}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_posts_tooltip}}" id='dismiss-posts' class='btn dismiss-read' {{action dismissRead "posts"}}>{{i18n topics.bulk.dismiss_posts}}</button>
|
||||
{{/if}}
|
||||
{{#if showResetNew}}
|
||||
<button class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
||||
<button id='dismiss-new' class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
||||
{{/if}}
|
||||
|
||||
{{#if latest}}
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
{{/if}}
|
||||
{{#if allLoaded}}
|
||||
{{#if showDismissRead}}
|
||||
<button title="{{i18n topics.bulk.dismiss_topics_tooltip}}" class='btn dismiss-read' {{action dismissRead "topics"}}>{{i18n topics.bulk.dismiss_topics}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_posts_tooltip}}" class='btn dismiss-read' {{action dismissRead "posts"}}>{{i18n topics.bulk.dismiss_posts}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_topics_tooltip}}" id='dismiss-topics' class='btn dismiss-read' {{action dismissRead "topics"}}>{{i18n topics.bulk.dismiss_topics}}</button>
|
||||
<button title="{{i18n topics.bulk.dismiss_posts_tooltip}}" id='dismiss-posts' class='btn dismiss-read' {{action dismissRead "posts"}}>{{i18n topics.bulk.dismiss_posts}}</button>
|
||||
{{/if}}
|
||||
{{#if showResetNew}}
|
||||
<button class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
||||
<button id='dismiss-new' class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
||||
{{/if}}
|
||||
|
||||
{{#if latest}}
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
<li>{{{i18n keyboard_shortcuts_help.jump_to.starred}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.jump_to.categories}}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h4>{{i18n keyboard_shortcuts_help.navigation.title}}</h4>
|
||||
<ul>
|
||||
<li>{{{i18n keyboard_shortcuts_help.navigation.back}}}</li>
|
||||
|
@ -20,6 +18,8 @@
|
|||
<li>{{{i18n keyboard_shortcuts_help.navigation.open}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.navigation.next_prev}}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h4>{{i18n keyboard_shortcuts_help.application.title}}</h4>
|
||||
<ul>
|
||||
<li>{{{i18n keyboard_shortcuts_help.application.create}}}</li>
|
||||
|
@ -28,6 +28,9 @@
|
|||
<li>{{{i18n keyboard_shortcuts_help.application.user_profile_menu}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.application.search}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.application.help}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.application.dismiss_new}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.application.dismiss_topics}}}</li>
|
||||
<li>{{{i18n keyboard_shortcuts_help.application.dismiss_posts}}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span6">
|
||||
|
|
|
@ -2058,6 +2058,9 @@ en:
|
|||
user_profile_menu: '<b>p</b> Open user profile menu'
|
||||
search: '<b>/</b> Search'
|
||||
help: '<b>?</b> Open keyboard shortcuts help'
|
||||
dismiss_new: '<b>d</b>, <b>n</b> Dismiss New'
|
||||
dismiss_topics: '<b>d</b>, <b>t</b> Dismiss Topics'
|
||||
dismiss_posts: '<b>d</b>, <b>p</b> Dismiss Posts'
|
||||
actions:
|
||||
title: 'Actions'
|
||||
star: '<b>f</b> Star topic'
|
||||
|
|
Loading…
Reference in New Issue
Block a user