Update live timestamps to give a more live feeling
This commit is contained in:
parent
4a5cd74fb2
commit
ee1c1b39b2
|
@ -1202,8 +1202,9 @@
|
|||
}
|
||||
td = $('<td></td>').attr({ "class": "date" });
|
||||
td.append($('<span></span>').attr({
|
||||
"class": "modified",
|
||||
"class": "modified live-relative-timestamp",
|
||||
"title": formatted,
|
||||
"data-timestamp": mtime,
|
||||
"style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')'
|
||||
}).text(text)
|
||||
.tooltip({placement: 'top'})
|
||||
|
|
|
@ -1660,6 +1660,13 @@ function initCore() {
|
|||
$('body').delegate('#app-content', 'apprendered appresized', adjustControlsWidth);
|
||||
|
||||
}
|
||||
|
||||
// Update live timestamps every 30 seconds
|
||||
setInterval(function() {
|
||||
$('.live-relative-timestamp').each(function() {
|
||||
$(this).text(OC.Util.relativeModifiedDate(parseInt($(this).attr('data-timestamp'), 10)));
|
||||
});
|
||||
}, 30 * 1000);
|
||||
}
|
||||
|
||||
$(document).ready(initCore);
|
||||
|
|
Loading…
Reference in New Issue