enable tooltips in the new SPV

This commit is contained in:
Jonne Haß 2013-08-19 18:41:02 +02:00 committed by Roger Braun
parent e036525e8d
commit f9cb662ff7
3 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,6 @@
app.views.SinglePostActions = app.views.Feedback.extend({
templateName: "single-post-viewer/single-post-actions",
tooltipSelector: "time",
events: function() {
return _.defaults({
@ -7,6 +8,11 @@ app.views.SinglePostActions = app.views.Feedback.extend({
}, app.views.Feedback.prototype.events);
},
renderPluginWidgets : function() {
app.views.Base.prototype.renderPluginWidgets.apply(this);
this.$('a').tooltip({placement: 'bottom'});
},
focusComment: function() {
$('.comment_box').focus();
$('html,body').animate({scrollTop: $('.comment_box').offset().top - ($('.comment_box').height() + 20)});

View file

@ -1,4 +1,5 @@
app.views.SinglePostCommentStream = app.views.CommentStream.extend({
tooltipSelector: "time, .controls a",
postRenderTemplate: function() {
app.views.CommentStream.prototype.postRenderTemplate.apply(this)

View file

@ -5,7 +5,7 @@
{{/unless}}
</span>
<span class="post-time">
<time datetime="{{created_at}}" />
<time datetime="{{created_at}}" title="{{localTime created_at}}" />
</span>
<div class="buttons pull-right">
<a href="#" rel="auth-required" class="like" title="{{#if userLike}} {{t "viewer.unlike"}} {{else}} {{t "viewer.like"}} {{/if}}">