Fixed timago tooltip in conversations
Fixed timeago errors Added cucumber stuff to test timeago at inbox Show localized date/time in tooltip Remove title attributes
This commit is contained in:
parent
af332b6cab
commit
37505c5ece
5 changed files with 38 additions and 7 deletions
|
|
@ -10,11 +10,28 @@ $(document).ready(function(){
|
|||
$("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(){
|
||||
$.getScript($(this).data('conversation-path'), function() {
|
||||
var conversation_path = $(this).data('conversation-path');
|
||||
|
||||
$.getScript(conversation_path, function() {
|
||||
Diaspora.page.directionDetector.updateBinds();
|
||||
});
|
||||
history.pushState(null, "", this.href);
|
||||
|
||||
history.pushState(null, "", conversation_path);
|
||||
|
||||
var conv = $(this).children('.stream_element'),
|
||||
cBadge = $("#message_inbox_badge .badge_count");
|
||||
|
|
@ -31,7 +48,6 @@ $(document).ready(function(){
|
|||
});
|
||||
}
|
||||
|
||||
jQuery("abbr.timeago").timeago();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:unread_count => unread_counts[conversation.id].to_i })
|
||||
|
||||
.last_author
|
||||
.timestamp
|
||||
%time.timeago.timestamp{:datetime => conversation.updated_at.iso8601}
|
||||
= t('ago', :time => time_ago_in_words(conversation.updated_at))
|
||||
|
||||
- if authors[conversation.id].present?
|
||||
|
|
|
|||
|
|
@ -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").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 @@
|
|||
= person_image_link(message.author, :size => :thumb_small)
|
||||
.bd
|
||||
= 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))
|
||||
|
||||
%div{ :class => direction_for(message.text) }
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ Feature: private messages
|
|||
Given I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
||||
Then I should see "Greetings" within "#conversation_inbox"
|
||||
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"
|
||||
Then I should see the participants popover
|
||||
And I should see "Alice Awesome" as part of the participants popover
|
||||
|
|
|
|||
Loading…
Reference in a new issue