Skip to content
Extraits de code Groupes Projets
Valider dc8a0eb9 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

Merge pull request #3914 from asphxia/3149-timeago-show-timestamp

Hovering a Timeago-String should show the Timestamp
parents cba76060 b91ed859
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -51,6 +51,7 @@ ...@@ -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) { ...@@ -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();
});
\ No newline at end of file
...@@ -20,7 +20,7 @@ app.views.StreamPost = app.views.Post.extend({ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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)
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter