diff options
-rw-r--r-- | apps/files/js/filelist.js | 3 | ||||
-rw-r--r-- | core/js/js.js | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ca41012764a..7584362317c 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -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'}) diff --git a/core/js/js.js b/core/js/js.js index 799d2ba0b24..a123846a72e 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); |