diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ca41012764..7584362317 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1202,8 +1202,9 @@ } td = $('').attr({ "class": "date" }); td.append($('').attr({ - "class": "modified", + "class": "modified live-relative-timestamp", "title": formatted, + "data-timestamp": mtime, "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')' }).text(text) .tooltip({placement: 'top'}) diff --git a/core/js/js.js b/core/js/js.js index 799d2ba0b2..a123846a72 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -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);