times of notifications didn't update properly
This commit is contained in:
parent
7534937fb7
commit
44815db8d0
|
@ -1588,7 +1588,7 @@ function addToFeed(feed, after, extraClasses) {
|
|||
</small>\
|
||||
</div>\
|
||||
<div class="small-grey-notice">\
|
||||
<a data-tooltip="' + parseTwitterLongDate(obj.notice.created_at) + '" href="' + window.siteInstanceURL + 'notice/' + obj.notice.id + '">\
|
||||
<a data-created-at="' + obj.notice.created_at + '" data-tooltip="' + parseTwitterLongDate(obj.notice.created_at) + '" href="' + window.siteInstanceURL + 'notice/' + obj.notice.id + '">\
|
||||
' + noticeTime + '\
|
||||
</a>: \
|
||||
' + $.trim(obj.notice.statusnet_html) + '\
|
||||
|
@ -1617,7 +1617,7 @@ function addToFeed(feed, after, extraClasses) {
|
|||
</small>\
|
||||
</div>\
|
||||
<div class="small-grey-notice">\
|
||||
<a data-tooltip="' + parseTwitterLongDate(obj.notice.created_at) + '" href="' + window.siteInstanceURL + 'notice/' + obj.notice.id + '">\
|
||||
<a data-created-at="' + obj.notice.created_at + '" data-tooltip="' + parseTwitterLongDate(obj.notice.created_at) + '" href="' + window.siteInstanceURL + 'notice/' + obj.notice.id + '">\
|
||||
' + noticeTime + '\
|
||||
</a>: \
|
||||
' + $.trim(obj.notice.statusnet_html) + '\
|
||||
|
|
|
@ -1661,8 +1661,15 @@ $(window).scroll(function() {
|
|||
· · · · · · · · · · · · · */
|
||||
|
||||
var updateTimesInterval=self.setInterval(function(){
|
||||
$('.created-at').each(function(){
|
||||
$('[data-created-at]').each(function(){
|
||||
// if the element with the data-created-at doesn't have an a-child, we change the html of the element
|
||||
if($(this).children('a').length==0){
|
||||
$(this).html(parseTwitterDate($(this).attr('data-created-at')));
|
||||
}
|
||||
// otherwise the change the child's html
|
||||
else {
|
||||
$(this).children('a').html(parseTwitterDate($(this).attr('data-created-at')));
|
||||
}
|
||||
});
|
||||
},10000);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user