issue #331 use timeago.js for reshared publish date instead of relative_date() which does not play well with other networks.

This commit is contained in:
redmatrix 2016-04-10 21:30:35 -07:00
parent d1a2aecfa0
commit 5cb3143c04
2 changed files with 8 additions and 3 deletions

View file

@ -243,9 +243,7 @@ function bb_ShareAttributes($match) {
if ($matches[1] != "")
$message_id = $matches[1];
/** @FIXME - this should really be a wall-item-ago so it will get updated on the client */
$reldate = (($posted) ? relative_date($posted) : '');
$reldate = '<span class="autotime" title="' . datetime_convert('UTC', date_default_timezone_get(), $posted, 'c') . '" >' . datetime_convert('UTC', date_default_timezone_get(), $posted, 'r') . '</span>';
$headline = '<div class="shared_container"> <div class="shared_header">';

View file

@ -491,6 +491,7 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
$("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago();
$("> .shared_header .autotime",this).timeago();
}
else {
$('img',this).each(function() {
@ -502,6 +503,7 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
$("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago();
$("> .shared_header .autotime",this).timeago();
}
prev = ident;
});
@ -529,6 +531,7 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
$("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago();
$("> .shared_header .autotime",this).timeago();
}
else {
$('img',this).each(function() {
@ -540,6 +543,7 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
$("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago();
$("> .shared_header .autotime",this).timeago();
}
});
@ -573,6 +577,7 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
$("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago();
$("> .shared_header .autotime",this).timeago();
}
prev = ident;
});
@ -1048,6 +1053,7 @@ function preview_comment(id) {
function(data) {
if(data.preview) {
$("#comment-edit-preview-" + id).html(data.preview);
$("#comment-edit-preview-" + id + " .autotime").timeago();
$("#comment-edit-preview-" + id + " a").click(function() { return false; });
}
},
@ -1078,6 +1084,7 @@ function preview_post() {
function(data) {
if(data.preview) {
$("#jot-preview-content").html(data.preview);
$("#jot-preview-content .autotime").timeago();
$("#jot-preview-content" + " a").click(function() { return false; });
}
},