aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-08-31 17:44:28 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-01 09:02:36 +0200
commit0c73797131cd7deacda08abc9324462893991368 (patch)
treeb2f32b043ca14b2a9e624aa95ca527d64051b1a0 /apps
parentee838a224eeb45d5b898e68a8d17b7d50fc7ad43 (diff)
downloadnextcloud-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.js3
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(),