Add comment focus button.
This commit is contained in:
parent
9996cbaf15
commit
867efeb80f
3 changed files with 21 additions and 0 deletions
|
|
@ -1,3 +1,16 @@
|
||||||
app.views.SinglePostActions = app.views.Feedback.extend({
|
app.views.SinglePostActions = app.views.Feedback.extend({
|
||||||
templateName: "single-post-viewer/single-post-actions",
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@
|
||||||
content: '\e717';
|
content: '\e717';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.comment:before {
|
||||||
|
content: '\e718';
|
||||||
|
}
|
||||||
|
|
||||||
&.red {
|
&.red {
|
||||||
color: #A40802;
|
color: #A40802;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
<a href="#" rel="auth-required" class="focus-comment" title="{{t "viewer.comment"}}">
|
||||||
|
<i class="entypo comment gray large"></i>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue