diff options
author | Joas Schilling <coding@schilljs.com> | 2016-08-31 17:44:28 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-01 09:02:36 +0200 |
commit | 0c73797131cd7deacda08abc9324462893991368 (patch) | |
tree | b2f32b043ca14b2a9e624aa95ca527d64051b1a0 /apps | |
parent | ee838a224eeb45d5b898e68a8d17b7d50fc7ad43 (diff) | |
download | nextcloud-server-0c73797131cd7deacda08abc9324462893991368.tar.gz nextcloud-server-0c73797131cd7deacda08abc9324462893991368.zip |
Use live timestamps in the versions tab of the sidebar
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_versions/js/versionstabview.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_versions/js/versionstabview.js b/apps/files_versions/js/versionstabview.js index 2424778b4ee..2e334edacb5 100644 --- a/apps/files_versions/js/versionstabview.js +++ b/apps/files_versions/js/versionstabview.js @@ -15,7 +15,7 @@ '<li data-revision="{{timestamp}}">' + '<img class="preview" src="{{previewUrl}}"/>' + '<a href="{{downloadUrl}}" class="downloadVersion"><img src="{{downloadIconUrl}}" />' + - '<span class="versiondate has-tooltip" title="{{formattedTimestamp}}">{{relativeTimestamp}}</span>' + + '<span class="versiondate has-tooltip live-relative-timestamp" data-timestamp="{{millisecondsTimestamp}}" title="{{formattedTimestamp}}">{{relativeTimestamp}}</span>' + '</a>' + '{{#canRevert}}' + '<a href="#" class="revertVersion" title="{{revertLabel}}"><img src="{{revertIconUrl}}" /></a>' + @@ -183,6 +183,7 @@ _formatItem: function(version) { var timestamp = version.get('timestamp') * 1000; return _.extend({ + millisecondsTimestamp: timestamp, formattedTimestamp: OC.Util.formatDate(timestamp), relativeTimestamp: OC.Util.relativeModifiedDate(timestamp), downloadUrl: version.getDownloadUrl(), |