Add comment focus button.

This commit is contained in:
Roger Braun 2013-08-18 18:16:39 +02:00
parent 9996cbaf15
commit 867efeb80f
3 changed files with 21 additions and 0 deletions

View file

@ -1,3 +1,16 @@
app.views.SinglePostActions = app.views.Feedback.extend({
templateName: "single-post-viewer/single-post-actions",
events: function() {
return _.defaults({
"click .focus-comment" : "focusComment"
}, app.views.Feedback.prototype.events);
},
focusComment: function() {
$('.comment_box').focus();
$("html, body").animate({ scrollTop: $(document).height()-$(window).height() }); // Go to the bottom.
return false;
}
});

View file

@ -15,6 +15,10 @@
content: '\e717';
}
&.comment:before {
content: '\e718';
}
&.red {
color: #A40802;
}

View file

@ -20,5 +20,9 @@
{{/if}}
</a>
{{/if}}
<a href="#" rel="auth-required" class="focus-comment" title="{{t "viewer.comment"}}">
<i class="entypo comment gray large"></i>
</a>
</div>
</div>