Use live timestamps in the versions tab of the sidebar
This commit is contained in:
parent
ee838a224e
commit
0c73797131
|
@ -15,7 +15,7 @@
|
||||||
'<li data-revision="{{timestamp}}">' +
|
'<li data-revision="{{timestamp}}">' +
|
||||||
'<img class="preview" src="{{previewUrl}}"/>' +
|
'<img class="preview" src="{{previewUrl}}"/>' +
|
||||||
'<a href="{{downloadUrl}}" class="downloadVersion"><img src="{{downloadIconUrl}}" />' +
|
'<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>' +
|
'</a>' +
|
||||||
'{{#canRevert}}' +
|
'{{#canRevert}}' +
|
||||||
'<a href="#" class="revertVersion" title="{{revertLabel}}"><img src="{{revertIconUrl}}" /></a>' +
|
'<a href="#" class="revertVersion" title="{{revertLabel}}"><img src="{{revertIconUrl}}" /></a>' +
|
||||||
|
@ -183,6 +183,7 @@
|
||||||
_formatItem: function(version) {
|
_formatItem: function(version) {
|
||||||
var timestamp = version.get('timestamp') * 1000;
|
var timestamp = version.get('timestamp') * 1000;
|
||||||
return _.extend({
|
return _.extend({
|
||||||
|
millisecondsTimestamp: timestamp,
|
||||||
formattedTimestamp: OC.Util.formatDate(timestamp),
|
formattedTimestamp: OC.Util.formatDate(timestamp),
|
||||||
relativeTimestamp: OC.Util.relativeModifiedDate(timestamp),
|
relativeTimestamp: OC.Util.relativeModifiedDate(timestamp),
|
||||||
downloadUrl: version.getDownloadUrl(),
|
downloadUrl: version.getDownloadUrl(),
|
||||||
|
|
Loading…
Reference in New Issue