-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display changes in file versions tab view and detailsView #26511
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,27 @@ | |
|
||
(function() { | ||
var TEMPLATE_ITEM = | ||
'<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>' + | ||
'<li data-revision="{{timestamp}}">' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use tabs instead of spaces in all the changed lines. |
||
'<div>' + | ||
'<div class="preview-container">' + | ||
'<img class="preview" src="{{previewUrl}}"/>' + | ||
'</div>' + | ||
'<div class="version-container">' + | ||
'<div>' + | ||
'<a href="{{downloadUrl}}" class="downloadVersion"><img src="{{downloadIconUrl}}" />' + | ||
'<span class="versiondate has-tooltip" title="{{formattedTimestamp}}">{{relativeTimestamp}}</span>' + | ||
'</a>' + | ||
'</div>' + | ||
'{{#hasDetails}}' + | ||
'<div class="version-details">' + | ||
'<span class="size has-tooltip" title="{{altSize}}">{{humanReadableSize}}</span>' + | ||
'</div>' + | ||
'{{/hasDetails}}' + | ||
'</div>' + | ||
'{{#canRevert}}' + | ||
'<a href="#" class="revertVersion" title="{{revertLabel}}"><img src="{{revertIconUrl}}" /></a>' + | ||
'{{/canRevert}}' + | ||
'</div>' + | ||
'</li>'; | ||
|
||
var TEMPLATE = | ||
|
@@ -180,9 +193,13 @@ | |
|
||
_formatItem: function(version) { | ||
var timestamp = version.get('timestamp') * 1000; | ||
var size = version.has('size') ? version.get('size') : 0; | ||
return _.extend({ | ||
formattedTimestamp: OC.Util.formatDate(timestamp), | ||
relativeTimestamp: OC.Util.relativeModifiedDate(timestamp), | ||
humanReadableSize: OC.Util.humanFileSize(size, true), | ||
altSize: n('files', '%n byte', '%n bytes', size), | ||
hasDetails: version.has('size'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems you missed some tabs here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. omg ^^. you're right .... |
||
downloadUrl: version.getDownloadUrl(), | ||
downloadIconUrl: OC.imagePath('core', 'actions/download'), | ||
revertIconUrl: OC.imagePath('core', 'actions/history'), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why "super" here ?
On Chromium for me the size appears under the date but not as superscript. It does look good already, so not sure why. If you wanted to shift it up a bit you could try
vertical-align: middle
and set a differentline-height
.