diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/css/detailsView.css | 9 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 1 | ||||
-rw-r--r-- | apps/files/js/mainfileinfodetailview.js | 4 | ||||
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 29 |
4 files changed, 37 insertions, 6 deletions
diff --git a/apps/files/css/detailsView.css b/apps/files/css/detailsView.css index 76629cb790f..dafd8c24573 100644 --- a/apps/files/css/detailsView.css +++ b/apps/files/css/detailsView.css @@ -12,11 +12,11 @@ } #app-sidebar .thumbnail { - width: 50px; - height: 50px; + width: 75px; + height: 75px; float: left; margin-right: 10px; - background-size: 50px; + background-size: 75px; } #app-sidebar .ellipsis { @@ -27,7 +27,8 @@ #app-sidebar .fileName { font-size: 16px; - padding-top: 3px; + padding-top: 13px; + padding-bottom: 3px; } #app-sidebar .file-details { diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index eb46f155269..e294e2f3c09 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -673,6 +673,7 @@ id: parseInt($el.attr('data-id'), 10), name: $el.attr('data-file'), mimetype: $el.attr('data-mime'), + mtime: parseInt($el.attr('data-mtime'), 10), type: $el.attr('data-type'), size: parseInt($el.attr('data-size'), 10), etag: $el.attr('data-etag'), diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 6910e5f2be5..8bf22149841 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -125,8 +125,8 @@ path: this.model.getFullPath(), mime: this.model.get('mimetype'), etag: this.model.get('etag'), - x: 50, - y: 50, + x: 75, + y: 75, callback: function(previewUrl) { $iconDiv.css('background-image', 'url("' + previewUrl + '")'); } diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 7ed60084fa9..a6d72a88efd 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -98,6 +98,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'One.txt', mimetype: 'text/plain', + mtime: 123456789, size: 12, etag: 'abc', permissions: OC.PERMISSION_ALL @@ -106,6 +107,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'Two.jpg', mimetype: 'image/jpeg', + mtime: 234567890, size: 12049, etag: 'def', permissions: OC.PERMISSION_ALL @@ -114,6 +116,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'Three.pdf', mimetype: 'application/pdf', + mtime: 234560000, size: 58009, etag: '123', permissions: OC.PERMISSION_ALL @@ -122,6 +125,7 @@ describe('OCA.Files.FileList tests', function() { type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', + mtime: 134560000, size: 250, etag: '456', permissions: OC.PERMISSION_ALL @@ -1722,6 +1726,7 @@ describe('OCA.Files.FileList tests', function() { id: 1, name: 'One.txt', mimetype: 'text/plain', + mtime: 123456789, type: 'file', size: 12, etag: 'abc', @@ -1732,6 +1737,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'Three.pdf', mimetype: 'application/pdf', + mtime: 234560000, size: 58009, etag: '123', permissions: OC.PERMISSION_ALL @@ -1741,6 +1747,7 @@ describe('OCA.Files.FileList tests', function() { type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', + mtime: 134560000, size: 250, etag: '456', permissions: OC.PERMISSION_ALL @@ -1754,6 +1761,7 @@ describe('OCA.Files.FileList tests', function() { id: 1, name: 'One.txt', mimetype: 'text/plain', + mtime: 123456789, type: 'file', size: 12, etag: 'abc', @@ -1764,6 +1772,7 @@ describe('OCA.Files.FileList tests', function() { type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', + mtime: 134560000, size: 250, etag: '456', permissions: OC.PERMISSION_ALL @@ -2330,4 +2339,24 @@ describe('OCA.Files.FileList tests', function() { }); }); }); + describe('elementToFile', function() { + var $tr; + + beforeEach(function() { + fileList.setFiles(testFiles); + $tr = fileList.findFileEl('One.txt'); + }); + + it('converts data attributes to file info structure', function() { + var fileInfo = fileList.elementToFile($tr); + expect(fileInfo.id).toEqual(1); + expect(fileInfo.name).toEqual('One.txt'); + expect(fileInfo.mtime).toEqual(123456789); + expect(fileInfo.etag).toEqual('abc'); + expect(fileInfo.permissions).toEqual(OC.PERMISSION_ALL); + expect(fileInfo.size).toEqual(12); + expect(fileInfo.mimetype).toEqual('text/plain'); + expect(fileInfo.type).toEqual('file'); + }); + }); }); |