Not all of these have been fully implemented yet. **Jump To** * `g` then `h` - Home (Latest) * `g` then `l` - Latest * `g` then `n` - New * `g` then `u` - Unread * `g` then `f` - Favorited * `g` then `c` - Categories List **Navigation** * `u` - Back to topic list * `k` / `j` - Newer/Older conversation or post * `o` or `Enter` - Open selected conversation * <code>`</code> - Go to next section * `~` - Go to previous section **Application** * `c` - Create a new topic * `n` - Open notifications menu * `/` - Search * `?` - Open keyboard shortcut help **Actions** * `f` - Favorite topic * `s` - Share topic * `<Shift>` + `s` - Share selected post * `r` - Reply to topic * `<Shift>` + `r` - Reply to selected post * `l` - Like selected post * `!` - Flag selected post * `b` - Bookmark selected post * `e` - Edit selected post * `d` - Delete selected post * `m` then `m` - Mark topic as muted * `m` then `r` - Mark topic as regular * `m` then `t` - Mark topic as tracking * `m` then `w` - Mark topic as watching
28 lines
673 B
JavaScript
28 lines
673 B
JavaScript
/**
|
|
A button for favoriting a topic
|
|
|
|
@class FavoriteButton
|
|
@extends Discourse.ButtonView
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.FavoriteButton = Discourse.ButtonView.extend({
|
|
classNames: ['favorite'],
|
|
textKey: 'favorite.title',
|
|
helpKeyBinding: 'controller.favoriteTooltipKey',
|
|
attributeBindings: ['disabled'],
|
|
|
|
shouldRerender: Discourse.View.renderIfChanged('controller.starred'),
|
|
|
|
click: function() {
|
|
this.get('controller').send('toggleStar');
|
|
},
|
|
|
|
renderIcon: function(buffer) {
|
|
buffer.push("<i class='fa fa-star " +
|
|
(this.get('controller.starred') ? ' starred' : '') +
|
|
"'></i>");
|
|
}
|
|
});
|
|
|