Merge pull request #3914 from asphxia/3149-timeago-show-timestamp
Hovering a Timeago-String should show the Timestamp
This commit is contained in:
commit
dc8a0eb94b
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)
|
* 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)
|
* 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)
|
* 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
|
## Gem Updates
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,3 +40,7 @@ Handlebars.registerHelper('personImage', function(person, size, imageClass) {
|
||||||
'title': _.escape(person.name)
|
'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"
|
"click .block_user": "blockUser"
|
||||||
},
|
},
|
||||||
|
|
||||||
tooltipSelector : ".delete, .block_user, .post_scope, .ignore",
|
tooltipSelector : ".timeago, .delete, .block_user, .post_scope, .ignore",
|
||||||
|
|
||||||
initialize : function(){
|
initialize : function(){
|
||||||
this.model.bind('remove', this.remove, this);
|
this.model.bind('remove', this.remove, this);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<span class="details grey">
|
<span class="details grey">
|
||||||
-
|
-
|
||||||
<a href="/posts/{{id}}">
|
<a href="/posts/{{id}}">
|
||||||
<time class="timeago" datetime="{{created_at}}" />
|
<time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{#if interactions.reshares_count}}
|
{{#if interactions.reshares_count}}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
.bd
|
.bd
|
||||||
= person_link(message.author, :class => 'author from')
|
= person_link(message.author, :class => 'author from')
|
||||||
%time.timeago{:datetime => message.created_at}
|
%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) }
|
%div{ :class => direction_for(message.text) }
|
||||||
= markdownify(message, :oembed => true)
|
= markdownify(message, :oembed => true)
|
||||||
Loading…
Reference in a new issue