diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 79ee355125d8f3989a6875eb12edc577feb3b2d6..a3fd605ff7e2d1a075754465ab31cc44bf5e161f 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -710,6 +710,14 @@ path = this.getCurrentDirectory(); } + if (type === 'dir') { + // use default folder icon + icon = icon || OC.imagePath('core', 'filetypes/folder'); + } + else { + icon = icon || OC.imagePath('core', 'filetypes/file'); + } + // filename td td = $('<td class="filename"></td>'); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index b12ac2f251723b9be466079520944ba74dd6f3d4..316df0281e9e0ded73083d61b3575bdfaf9faf54 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -697,7 +697,7 @@ describe('OCA.Files.FileList tests', function() { expect(fileList.findFileEl('One.txt').length).toEqual(1); expect(OC.TestUtil.getImageUrl(fileList.findFileEl('One.txt').find('.thumbnail'))) - .toEqual(OC.imagePath('core', 'filetypes/file.svg')); + .toEqual(OC.imagePath('core', 'filetypes/text.svg')); }); }); describe('Moving files', function() { @@ -816,7 +816,7 @@ describe('OCA.Files.FileList tests', function() { expect(notificationStub.getCall(0).args[0]).toEqual('Error while moving file'); expect(OC.TestUtil.getImageUrl(fileList.findFileEl('One.txt').find('.thumbnail'))) - .toEqual(OC.imagePath('core', 'filetypes/file.svg')); + .toEqual(OC.imagePath('core', 'filetypes/text.svg')); }); }); describe('List rendering', function() { @@ -1161,7 +1161,8 @@ describe('OCA.Files.FileList tests', function() { var fileData = { type: 'file', name: 'test dir', - icon: OC.webroot + '/core/img/filetypes/application-pdf.svg' + icon: OC.webroot + '/core/img/filetypes/application-pdf.svg', + mimetype: 'application/pdf' }; var $tr = fileList.add(fileData); var $imgDiv = $tr.find('td.filename .thumbnail'); diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js index 1bbf4ffca09b778f43c86f49733f770b1d3522de..aa409285ca4d66a84e57c76907046c908b3522e0 100644 --- a/apps/files_sharing/tests/js/shareSpec.js +++ b/apps/files_sharing/tests/js/shareSpec.js @@ -90,7 +90,7 @@ describe('OCA.Sharing.Util tests', function() { type: 'dir', name: 'One', path: '/subdir', - mimetype: 'text/plain', + mimetype: 'httpd/unix-directory', size: 12, permissions: OC.PERMISSION_ALL, etag: 'abc'