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

Merge branch 'netom-4257-conversations-timeago' into develop

parents af332b6c 37505c5e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* Render markdown content for prettier email subjects and titles [#4182](https://github.com/diaspora/diaspora/issues/4182) * Render markdown content for prettier email subjects and titles [#4182](https://github.com/diaspora/diaspora/issues/4182)
* Disable invite button after sending invite [#4173](https://github.com/diaspora/diaspora/issues/4173) * Disable invite button after sending invite [#4173](https://github.com/diaspora/diaspora/issues/4173)
* Fix pagination for people list on the tag stream page [#4245](https://github.com/diaspora/diaspora/pull/4245) * Fix pagination for people list on the tag stream page [#4245](https://github.com/diaspora/diaspora/pull/4245)
* Fix missing timeago tooltip in conversations [#4257](https://github.com/diaspora/diaspora/issues/4257)
## Features ## Features
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252) * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
......
...@@ -10,11 +10,28 @@ $(document).ready(function(){ ...@@ -10,11 +10,28 @@ $(document).ready(function(){
$("html").scrollTop($('#first_unread').offset().top-45); $("html").scrollTop($('#first_unread').offset().top-45);
} }
$('time.timeago').each(function(i,e) {
var jqe = $(e);
jqe.attr('data-original-title', new Date(jqe.attr('datetime')).toLocaleString());
jqe.attr('title', '');
});
$('.timeago').tooltip();
$('.timeago').timeago();
$('time.timeago').each(function(i,e) {
var jqe = $(e);
jqe.attr('title', '');
});
$('.conversation-wrapper').live('click', function(){ $('.conversation-wrapper').live('click', function(){
$.getScript($(this).data('conversation-path'), function() { var conversation_path = $(this).data('conversation-path');
$.getScript(conversation_path, function() {
Diaspora.page.directionDetector.updateBinds(); Diaspora.page.directionDetector.updateBinds();
}); });
history.pushState(null, "", this.href);
history.pushState(null, "", conversation_path);
var conv = $(this).children('.stream_element'), var conv = $(this).children('.stream_element'),
cBadge = $("#message_inbox_badge .badge_count"); cBadge = $("#message_inbox_badge .badge_count");
...@@ -31,7 +48,6 @@ $(document).ready(function(){ ...@@ -31,7 +48,6 @@ $(document).ready(function(){
}); });
} }
jQuery("abbr.timeago").timeago();
return false; return false;
}); });
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:unread_count => unread_counts[conversation.id].to_i }) :unread_count => unread_counts[conversation.id].to_i })
.last_author .last_author
.timestamp %time.timeago.timestamp{:datetime => conversation.updated_at.iso8601}
= t('ago', :time => time_ago_in_words(conversation.updated_at)) = t('ago', :time => time_ago_in_words(conversation.updated_at))
- if authors[conversation.id].present? - if authors[conversation.id].present?
......
...@@ -4,6 +4,19 @@ $(".stream_element", "#conversation_inbox").removeClass('selected'); ...@@ -4,6 +4,19 @@ $(".stream_element", "#conversation_inbox").removeClass('selected');
$(".stream_element[data-guid='<%= @conversation.id %>']", "#conversation_inbox").addClass('selected'); $(".stream_element[data-guid='<%= @conversation.id %>']", "#conversation_inbox").addClass('selected');
$(".stream_element[data-guid='<%= @conversation.id %>']", "#conversation_inbox").find(".unread_message_count").remove() $(".stream_element[data-guid='<%= @conversation.id %>']", "#conversation_inbox").find(".unread_message_count").remove()
$("html").scrollTop($('#first_unread').offset().top-45); $('time.timeago').each(function(i,e) {
var jqe = $(e);
jqe.attr('data-original-title', new Date(jqe.attr('datetime')).toLocaleString());
});
Diaspora.page.timeAgo.updateTimeAgo(); if ($('#first_unread') > 0) {
$("html").scrollTop($('#first_unread').offset().top-45);
}
$(".timeago").tooltip();
$("time.timeago").timeago();
$('time.timeago').each(function(i,e) {
var jqe = $(e);
jqe.attr('title', '');
});
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= person_image_link(message.author, :size => :thumb_small) = person_image_link(message.author, :size => :thumb_small)
.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.iso8601}
= t('ago', :time => time_ago_in_words(message.created_at)) = t('ago', :time => time_ago_in_words(message.created_at))
%div{ :class => direction_for(message.text) } %div{ :class => direction_for(message.text) }
......
...@@ -14,6 +14,8 @@ Feature: private messages ...@@ -14,6 +14,8 @@ Feature: private messages
Given I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome" Given I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
Then I should see "Greetings" within "#conversation_inbox" Then I should see "Greetings" within "#conversation_inbox"
And I should see "Greetings" within "#conversation_show" And I should see "Greetings" within "#conversation_show"
And I should see "less than a minute ago" within "#conversation_inbox"
And I should see "less than a minute ago" within "#conversation_show"
And I click on selector "a.participants_link" And I click on selector "a.participants_link"
Then I should see the participants popover Then I should see the participants popover
And I should see "Alice Awesome" as part of the participants popover And I should see "Alice Awesome" as part of the participants popover
......
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