summaryrefslogtreecommitdiffstats
path: root/apps/files/js/mainfileinfodetailview.js
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-08-31 17:44:09 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-01 09:02:36 +0200
commitee838a224eeb45d5b898e68a8d17b7d50fc7ad43 (patch)
tree95a1e0267a34b658a26f7c555100e092a17b9562 /apps/files/js/mainfileinfodetailview.js
parentee1c1b39b29fbad948068f93b2a0eeb537ef456c (diff)
downloadnextcloud-server-ee838a224eeb45d5b898e68a8d17b7d50fc7ad43.tar.gz
nextcloud-server-ee838a224eeb45d5b898e68a8d17b7d50fc7ad43.zip
Use live timestamp in the sidebar details
Diffstat (limited to 'apps/files/js/mainfileinfodetailview.js')
-rw-r--r--apps/files/js/mainfileinfodetailview.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js
index 30b2b531df7..20cedcf4e82 100644
--- a/apps/files/js/mainfileinfodetailview.js
+++ b/apps/files/js/mainfileinfodetailview.js
@@ -24,7 +24,7 @@
' class="action action-favorite favorite">' +
' <img class="svg" alt="{{starAltText}}" src="{{starIcon}}" />' +
' </a>' +
- ' {{#if hasSize}}<span class="size" title="{{altSize}}">{{size}}</span>, {{/if}}<span class="date" title="{{altDate}}">{{date}}</span>' +
+ ' {{#if hasSize}}<span class="size" title="{{altSize}}">{{size}}</span>, {{/if}}<span class="date live-relative-timestamp" data-timestamp="{{timestamp}}" title="{{altDate}}">{{date}}</span>' +
' </div>' +
'</div>' +
'<div class="hidden permalink-field">' +
@@ -152,6 +152,7 @@
altSize: n('files', '%n byte', '%n bytes', this.model.get('size')),
dateLabel: t('files', 'Modified'),
altDate: OC.Util.formatDate(this.model.get('mtime')),
+ timestamp: this.model.get('mtime'),
date: OC.Util.relativeModifiedDate(this.model.get('mtime')),
starAltText: isFavorite ? t('files', 'Favorited') : t('files', 'Favorite'),
starIcon: OC.imagePath('core', isFavorite ? 'actions/starred' : 'actions/star'),