UX: Allow users to tab to the activity column

This commit is contained in:
Robin Ward 2014-08-18 14:44:31 -04:00
parent db4abe76db
commit c5d6f6a034
3 changed files with 11 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export default Ember.Component.extend({
}.property('bumpedAt', 'createdAt'), }.property('bumpedAt', 'createdAt'),
render: function(buffer) { render: function(buffer) {
buffer.push(Discourse.Formatter.autoUpdatingRelativeAge(this.get('bumpedAt'))); buffer.push("<a href>" + Discourse.Formatter.autoUpdatingRelativeAge(this.get('bumpedAt')) + "</a>");
}, },
click: function() { click: function() {
@ -45,12 +45,14 @@ export default Ember.Component.extend({
if (Discourse.Mobile.mobileView) { if (Discourse.Mobile.mobileView) {
Discourse.URL.routeTo(topic.get('lastPostUrl')); Discourse.URL.routeTo(topic.get('lastPostUrl'));
return; return false;
} }
this.sendAction('action', { this.sendAction('action', {
topic: topic, topic: topic,
position: this.$('span').position() position: this.$('span').position()
}); });
return false;
} }
}); });

View File

@ -1,4 +1,4 @@
<button {{action enterTop}} class='btn full no-text'> <button {{action enterTop}} class='btn full no-text jump-top'>
<i class='fa fa-caret-up'></i> {{topDate}} <i class='fa fa-caret-up'></i> {{topDate}}
</button> </button>
<button {{action enterBottom}} class='btn full no-text jump-bottom'> <button {{action enterBottom}} class='btn full no-text jump-bottom'>

View File

@ -47,4 +47,10 @@ export default Ember.View.extend({
this.appEvents.on('dom:clean', this, '_cleanUp'); this.appEvents.on('dom:clean', this, '_cleanUp');
}.on('didInsertElement'), }.on('didInsertElement'),
keyDown: function(e) {
if (e.which === 27) {
this._cleanUp();
}
}
}); });