fix timeago

This commit is contained in:
Steffen van Bergerem 2014-01-29 02:59:10 +01:00
parent 300a7c1c31
commit fe01734a3d
6 changed files with 9 additions and 8 deletions

View file

@ -8,6 +8,7 @@
//= require mbp-helper //= require mbp-helper
//= require jquery.autoSuggest.custom //= require jquery.autoSuggest.custom
//= require fileuploader-custom //= require fileuploader-custom
//= require rails-timeago
$(document).ready(function(){ $(document).ready(function(){

View file

@ -3,6 +3,6 @@ Diaspora.Pages.NotificationsIndex = function() {
this.subscribe("page/ready", function(evt, document) { this.subscribe("page/ready", function(evt, document) {
self.infiniteScroll = self.instantiate("InfiniteScroll"); self.infiniteScroll = self.instantiate("InfiniteScroll");
self.instantiate("TimeAgo", document.find("abbr.timeago")); self.instantiate("TimeAgo", document.find("time.timeago"));
}); });
}; };

View file

@ -64,7 +64,7 @@
self.dropdownNotifications.append(notification.note_html); self.dropdownNotifications.append(notification.note_html);
}); });
}); });
self.dropdownNotifications.find("abbr.timeago").timeago(); self.dropdownNotifications.find("time.timeago").timeago();
self.dropdownNotifications.find('.unread').each(function(index) { self.dropdownNotifications.find('.unread').each(function(index) {
Diaspora.page.header.notifications.setUpUnread( $(this) ); Diaspora.page.header.notifications.setUpUnread( $(this) );

View file

@ -95,7 +95,7 @@
.last_message { .last_message {
color: $white; color: $white;
} }
.timestamp { color: $background-grey; } .timeago { color: $background-grey; }
} }
&.selected:hover { background-color: lighten($blue,5%); } &.selected:hover { background-color: lighten($blue,5%); }
&:hover { cursor: pointer; } &:hover { cursor: pointer; }
@ -130,7 +130,7 @@
} }
} }
.timestamp { .timeago {
float: right; float: right;
line-height: normal; line-height: normal;
font-weight: normal; font-weight: normal;
@ -150,7 +150,7 @@
.last_message { .last_message {
color: $white; color: $white;
} }
.timestamp { color: $background-grey; } .timeago { color: $background-grey; }
} }
#left_pane { #left_pane {

View file

@ -75,7 +75,7 @@ h3 {
.photo_attachments { .photo_attachments {
margin: { margin: {
top: 6px; }; } top: 6px; }; }
.time { .timeago {
font: { font: {
weight: normal; }; } weight: normal; }; }
padding: 0 !important; padding: 0 !important;
@ -217,7 +217,7 @@ h3 {
color: #ccc; } } color: #ccc; } }
.comment { .comment {
.time { .timeago {
color: $text-dark-grey; } } color: $text-dark-grey; } }
.info { .info {

View file

@ -18,7 +18,7 @@ module ApplicationHelper
end end
def timeago(time, options={}) def timeago(time, options={})
timeago_tag(time, options.merge(:title => time.iso8601)) if time timeago_tag(time, options.merge(:class => 'timeago', :title => time.iso8601, :force => true)) if time
end end
def bookmarklet def bookmarklet