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'),
render: function(buffer) {
buffer.push(Discourse.Formatter.autoUpdatingRelativeAge(this.get('bumpedAt')));
buffer.push("<a href>" + Discourse.Formatter.autoUpdatingRelativeAge(this.get('bumpedAt')) + "</a>");
},
click: function() {
@ -45,12 +45,14 @@ export default Ember.Component.extend({
if (Discourse.Mobile.mobileView) {
Discourse.URL.routeTo(topic.get('lastPostUrl'));
return;
return false;
}
this.sendAction('action', {
topic: topic,
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}}
</button>
<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');
}.on('didInsertElement'),
keyDown: function(e) {
if (e.which === 27) {
this._cleanUp();
}
}
});