Hovering a Timeago-String should show the Timestamp
This commit is contained in:
parent
cba76060bf
commit
b91ed859a1
5 changed files with 8 additions and 3 deletions
|
|
@ -51,6 +51,7 @@
|
|||
* Excesive padding with "user-controls" in single post view. [#3861](https://github.com/diaspora/diaspora/issues/3861)
|
||||
* Resize full scaled image to a specific width. [#3818](https://github.com/diaspora/diaspora/issues/3818)
|
||||
* Fix translation issue in contacts_helper [#3937](https://github.com/diaspora/diaspora/pull/3937)
|
||||
* Show timestamp hovering a timeago string (stream) [#3149](https://github.com/diaspora/diaspora/issues/3149)
|
||||
|
||||
## Gem Updates
|
||||
|
||||
|
|
|
|||
|
|
@ -40,3 +40,7 @@ Handlebars.registerHelper('personImage', function(person, size, imageClass) {
|
|||
'title': _.escape(person.name)
|
||||
});
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('localTime', function(timestamp) {
|
||||
return new Date(timestamp).toLocaleString();
|
||||
});
|
||||
|
|
@ -20,7 +20,7 @@ app.views.StreamPost = app.views.Post.extend({
|
|||
"click .block_user": "blockUser"
|
||||
},
|
||||
|
||||
tooltipSelector : ".delete, .block_user, .post_scope, .ignore",
|
||||
tooltipSelector : ".timeago, .delete, .block_user, .post_scope, .ignore",
|
||||
|
||||
initialize : function(){
|
||||
this.model.bind('remove', this.remove, this);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<span class="details grey">
|
||||
-
|
||||
<a href="/posts/{{id}}">
|
||||
<time class="timeago" datetime="{{created_at}}" />
|
||||
<time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}" />
|
||||
</a>
|
||||
|
||||
{{#if interactions.reshares_count}}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
.bd
|
||||
= person_link(message.author, :class => 'author from')
|
||||
%time.timeago{:datetime => message.created_at}
|
||||
= how_long_ago(message)
|
||||
= t('ago', :time => time_ago_in_words(message.created_at))
|
||||
|
||||
%div{ :class => direction_for(message.text) }
|
||||
= markdownify(message, :oembed => true)
|
||||
Loading…
Reference in a new issue